package stest.tron.wallet.depositWithdraw;

import com.google.protobuf.ByteString;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import java.util.HashMap;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
import lombok.extern.slf4j.Slf4j;
import org.junit.Assert;
import org.spongycastle.util.encoders.Hex;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Test;
import org.tron.api.GrpcAPI.TransactionExtention;
import org.tron.api.WalletGrpc;
import org.tron.api.WalletSolidityGrpc;
import org.tron.common.crypto.ECKey;
import org.tron.common.utils.ByteArray;
import org.tron.common.utils.Utils;
import org.tron.core.Wallet;
import org.tron.protos.Protocol.Account;
import org.tron.protos.Protocol.TransactionInfo;
import stest.tron.wallet.common.client.Configuration;
import stest.tron.wallet.common.client.Parameter.CommonConstant;
import stest.tron.wallet.common.client.WalletClient;
import stest.tron.wallet.common.client.utils.AbiUtil;
import stest.tron.wallet.common.client.utils.Base58;
import stest.tron.wallet.common.client.utils.PublicMethed;
import stest.tron.wallet.common.client.utils.PublicMethedForDailybuild;

@Slf4j
public class DelegateCallSide001 {
//
//
//  final String mainGateWayAddress = Configuration.getByPath("testng.conf")
//      .getString("gateway_address.key1");
//  final String sideGatewayAddress = Configuration.getByPath("testng.conf")
//      .getString("gateway_address.key2");
//  final byte[] sideChainAddressKey = WalletClient.decodeFromBase58Check(sideGatewayAddress);
//  final String chainIdAddress = Configuration.getByPath("testng.conf")
//      .getString("gateway_address.chainIdAddress");
//  final byte[] chainIdAddressKey = WalletClient.decodeFromBase58Check(chainIdAddress);
//  final String gateWatOwnerAddressKey = Configuration.getByPath("testng.conf")
//      .getString("gateWatOwnerAddressKey.key2");
//  final String ChainIdAddress = Configuration.getByPath("testng.conf")
//      .getString("gateway_address.chainIdAddress");
//  final byte[] ChainIdAddressKey = WalletClient.decodeFromBase58Check(ChainIdAddress);
//  private final String testDepositTrx = Configuration.getByPath("testng.conf")
//      .getString("foundationAccount.key2");
//  private final byte[] testDepositAddress = PublicMethed.getFinalAddress(testDepositTrx);
//  private final byte[] gateWatOwnerAddress = PublicMethed.getFinalAddress(gateWatOwnerAddressKey);
//  private final String testOracle = Configuration.getByPath("testng.conf")
//      .getString("oralceAccountKey.key1");
//  private final byte[] testOracleAddress = PublicMethed.getFinalAddress(testOracle);
//  private final String sideGateWayOwner = Configuration.getByPath("testng.conf")
//      .getString("gateWatOwnerAddressKey.key2");
//  private final byte[] sideGateWayOwnerAddress = PublicMethed.getFinalAddress(sideGateWayOwner);
//  ECKey ecKey1 = new ECKey(Utils.getRandom());
//  byte[] depositAddress = ecKey1.getAddress();
//  String testKeyFordeposit = ByteArray.toHexString(ecKey1.getPrivKeyBytes());
//  ECKey ecKey2 = new ECKey(Utils.getRandom());
//  byte[] ownerAddress1 = ecKey2.getAddress();
//  String ownerKey1 = ByteArray.toHexString(ecKey2.getPrivKeyBytes());
//  ECKey ecKey3 = new ECKey(Utils.getRandom());
//  byte[] ownerAddress2 = ecKey3.getAddress();
//  String ownerKey2 = ByteArray.toHexString(ecKey3.getPrivKeyBytes());
//  String parame1 = null;
//  private Long maxFeeLimit = Configuration.getByPath("testng.conf")
//      .getLong("defaultParameter.maxFeeLimit");
//  private ManagedChannel channelSolidity = null;
//  private ManagedChannel channelFull = null;
//  private WalletGrpc.WalletBlockingStub blockingStubFull = null;
//  private ManagedChannel channelFull1 = null;
//  private WalletGrpc.WalletBlockingStub blockingSideStubFull = null;
//  private WalletSolidityGrpc.WalletSolidityBlockingStub blockingStubSolidity = null;
//  private String fullnode = Configuration.getByPath("testng.conf")
//      .getStringList("mainfullnode.ip.list").get(0);
//  private String fullnode1 = Configuration.getByPath("testng.conf")
//      .getStringList("fullnode.ip.list").get(0);
//
//  @BeforeSuite
//  public void beforeSuite() {
//    Wallet wallet = new Wallet();
//    Wallet.setAddressPreFixByte(CommonConstant.ADD_PRE_FIX_BYTE_MAINNET);
//  }
//
//  /**
//   * constructor.
//   */
//
//  @BeforeClass(enabled = true)
//  public void beforeClass() {
//    PublicMethed.printAddress(testKeyFordeposit);
//    channelFull = ManagedChannelBuilder.forTarget(fullnode)
//        .usePlaintext(true)
//        .build();
//    blockingStubFull = WalletGrpc.newBlockingStub(channelFull);
//    channelFull1 = ManagedChannelBuilder.forTarget(fullnode1)
//        .usePlaintext(true)
//        .build();
//    blockingSideStubFull = WalletGrpc.newBlockingStub(channelFull1);
//  }
//
//  @Test(enabled = true, description = "DelegateCall for increase method and mapping data structure in sideChain")
//  public void test1DelegateCall001() {
//
//    parame1 = "10";
//    byte[] input1 = Hex.decode(AbiUtil.parseMethod("setWithdrawMinTrx(uint256)", parame1, false));
//    String ownerTrx = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            WalletClient.decodeFromBase58Check(chainIdAddress), 0l, input1,
//            1000000000,
//            0l, "0", gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//    logger.info("ownerTrx : " + ownerTrx);
//    PublicMethed.waitProduceNextBlock(blockingStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    Optional<TransactionInfo> infoById2 = PublicMethed
//        .getTransactionInfoById(ownerTrx, blockingSideStubFull);
//    Assert.assertEquals(0, infoById2.get().getResultValue());
//
//    TransactionExtention transactionExtention = PublicMethedForDailybuild
//        .triggerConstantContractForExtention(sideChainAddressKey,
//            "withdrawMinTrx()", "", false,
//            0, 0, "0", 0, gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//
//    Assert.assertEquals(10,
//        ByteArray.toInt(transactionExtention.getConstantResult(0).toByteArray()));
//
//    /*// deploy testMainContract
//    String contractName = "testSideContract";
//    String code = "6080604052600480546001600160a01b0319908116620100001790915560058054821662010001179055600160068190556007819055600881905560006009819055600a5560178190558054909116331790556175fa806100616000396000f3fe6080604052600436106200040a5760003560e01c80638456cb591162000217578063bedb86fb1162000127578063df5dd1a511620000af578063ef42438f1162000079578063ef42438f1462001206578063f2fde38b1462001247578063f4072de61462001288578063fdcfc3ef14620012c9576200040a565b8063df5dd1a5146200110f578063e63307661462001150578063e6b7ad2e1462001191578063e941fa7814620011d2576200040a565b8063d7499ce011620000f1578063d7499ce0146200100b578063d85d2d34146200104c578063db13a12b146200108d578063dd012a1514620010ce576200040a565b8063bedb86fb1462000f14578063c13299841462000f55578063c26d62f21462000f96578063cd9b9a571462000fca576200040a565b8063a2a3abe611620001ab578063addd50991162000175578063addd50991462000dfc578063b6ac642a1462000e3d578063b74e729d1462000e7e578063bc3d4d161462000ed3576200040a565b8063a2a3abe61462000d20578063a8d435021462000d63578063a97e5c931462000d7a578063aa56976b1462000dbb576200040a565b806397bcfad011620001ed57806397bcfad01462000c515780639c1fcc4c1462000c925780639cd4adac1462000cc6578063a029b0961462000cdd576200040a565b80638456cb591462000bb5578063898de9991462000be95780638da5cb5b1462000c1d576200040a565b80634a6bdd6a116200031f578063641657cb11620002a757806375b4d78c116200027157806375b4d78c1462000aae5780637dc793751462000ae2578063831a292e1462000b235780638372537d1462000b74576200040a565b8063641657cb14620009b757806367b4e31b14620009f857806367bf59031462000a39578063725ef90f1462000a6d576200040a565b806352e67e4211620002e957806352e67e42146200091457806354137e49146200092b5780635ce692f214620009425780635d37f3e61462000976576200040a565b80634a6bdd6a14620008445780634c0923f8146200084e5780634d715a81146200089f5780635174169e14620008e0576200040a565b80631a09cdeb11620003a357806335ba4ebb116200036d57806335ba4ebb146200074d5780633691a93114620007815780633f8d054914620007c2578063473c3bd71462000803576200040a565b80631a09cdeb14620006545780632633de5f146200069557806330e86ecf14620006e5578063314bb5e21462000719576200040a565b80630e321a4211620003e55780630e321a42146200054e57806312bec7b1146200058f57806314a39ded14620005d05780631540aa891462000611576200040a565b806302ec2e73146200047e57806307da68f514620004c15780630a61c59f146200050d575b600c5460ff1615620004395760405162461bcd60e51b8152600401620004309062005349565b60405180910390fd5b600c54610100900460ff1615620004645760405162461bcd60e51b815260040162000430906200535b565b60405162461bcd60e51b81526004016200043090620053c7565b3480156200048b57600080fd5b50d380156200049957600080fd5b50d28015620004a757600080fd5b50620004bf620004b936600462004507565b6200130a565b005b348015620004ce57600080fd5b50d38015620004dc57600080fd5b50d28015620004ea57600080fd5b50620004f56200133c565b6040516200050491906200525c565b60405180910390f35b3480156200051a57600080fd5b50d380156200052857600080fd5b50d280156200053657600080fd5b50620004bf62000548366004620041e6565b6200134a565b3480156200055b57600080fd5b50d380156200056957600080fd5b50d280156200057757600080fd5b50620004f56200058936600462004507565b620013c2565b3480156200059c57600080fd5b50d38015620005aa57600080fd5b50d28015620005b857600080fd5b50620004bf620005ca366004620041e6565b620013d7565b348015620005dd57600080fd5b50d38015620005eb57600080fd5b50d28015620005f957600080fd5b50620004f56200060b36600462004507565b6200142c565b3480156200061e57600080fd5b50d380156200062c57600080fd5b50d280156200063a57600080fd5b506200064562001444565b604051620005049190620054b1565b3480156200066157600080fd5b50d380156200066f57600080fd5b50d280156200067d57600080fd5b50620004bf6200068f36600462004528565b6200144b565b348015620006a257600080fd5b50d38015620006b057600080fd5b50d28015620006be57600080fd5b50620006d6620006d036600462004507565b62001597565b60405162000504919062004ff6565b348015620006f257600080fd5b50d380156200070057600080fd5b50d280156200070e57600080fd5b5062000645620015bf565b3480156200072657600080fd5b50d380156200073457600080fd5b50d280156200074257600080fd5b5062000645620015c5565b3480156200075a57600080fd5b50d380156200076857600080fd5b50d280156200077657600080fd5b5062000645620015cb565b3480156200078e57600080fd5b50d380156200079c57600080fd5b50d28015620007aa57600080fd5b50620004bf620007bc3660046200420f565b620015d1565b348015620007cf57600080fd5b50d38015620007dd57600080fd5b50d28015620007eb57600080fd5b50620004bf620007fd36600462004507565b62001693565b3480156200081057600080fd5b50d380156200081e57600080fd5b50d280156200082c57600080fd5b50620006d66200083e366004620041e6565b620016c5565b62000645620016e0565b3480156200085b57600080fd5b50d380156200086957600080fd5b50d280156200087757600080fd5b506200088f6200088936600462004507565b62001993565b60405162000504929190620054c1565b348015620008ac57600080fd5b50d38015620008ba57600080fd5b50d28015620008c857600080fd5b50620004bf620008da3660046200430e565b620019b2565b348015620008ed57600080fd5b50d38015620008fb57600080fd5b50d280156200090957600080fd5b506200064562001a76565b6200064562000925366004620044a7565b62001a7c565b620006456200093c36600462004576565b62001cf0565b3480156200094f57600080fd5b50d380156200095d57600080fd5b50d280156200096b57600080fd5b5062000645620020b0565b3480156200098357600080fd5b50d380156200099157600080fd5b50d280156200099f57600080fd5b50620004bf620009b136600462004528565b620020b6565b348015620009c457600080fd5b50d38015620009d257600080fd5b50d28015620009e057600080fd5b50620004bf620009f2366004620044e6565b620021e4565b34801562000a0557600080fd5b50d3801562000a1357600080fd5b50d2801562000a2157600080fd5b50620004bf62000a3336600462004528565b6200222b565b34801562000a4657600080fd5b50d3801562000a5457600080fd5b50d2801562000a6257600080fd5b50620006d66200236b565b34801562000a7a57600080fd5b50d3801562000a8857600080fd5b50d2801562000a9657600080fd5b50620004bf62000aa836600462004378565b6200237a565b34801562000abb57600080fd5b50d3801562000ac957600080fd5b50d2801562000ad757600080fd5b506200064562002433565b34801562000aef57600080fd5b50d3801562000afd57600080fd5b50d2801562000b0b57600080fd5b50620004bf62000b1d366004620041e6565b62002439565b34801562000b3057600080fd5b50d3801562000b3e57600080fd5b50d2801562000b4c57600080fd5b5062000b6462000b5e36600462004507565b620024cc565b6040516200050492919062005233565b34801562000b8157600080fd5b50d3801562000b8f57600080fd5b50d2801562000b9d57600080fd5b50620004bf62000baf3660046200430e565b62002625565b34801562000bc257600080fd5b50d3801562000bd057600080fd5b50d2801562000bde57600080fd5b50620004f5620026e1565b34801562000bf657600080fd5b50d3801562000c0457600080fd5b50d2801562000c1257600080fd5b5062000645620026ea565b34801562000c2a57600080fd5b50d3801562000c3857600080fd5b50d2801562000c4657600080fd5b50620006d6620026f0565b34801562000c5e57600080fd5b50d3801562000c6c57600080fd5b50d2801562000c7a57600080fd5b50620004bf62000c8c366004620044a7565b620026ff565b34801562000c9f57600080fd5b50d3801562000cad57600080fd5b50d2801562000cbb57600080fd5b50620006d66200271b565b620004bf62000cd736600462004507565b6200272a565b34801562000cea57600080fd5b50d3801562000cf857600080fd5b50d2801562000d0657600080fd5b5062000d1162002b94565b604051620005049190620052ca565b34801562000d2d57600080fd5b50d3801562000d3b57600080fd5b50d2801562000d4957600080fd5b5062000d5462002bb3565b60405162000504919062005220565b6200064562000d74366004620044a7565b62002c17565b34801562000d8757600080fd5b50d3801562000d9557600080fd5b50d2801562000da357600080fd5b50620004f562000db5366004620041e6565b62002e4e565b34801562000dc857600080fd5b50d3801562000dd657600080fd5b50d2801562000de457600080fd5b506200088f62000df6366004620041e6565b62002e70565b34801562000e0957600080fd5b50d3801562000e1757600080fd5b50d2801562000e2557600080fd5b50620004f562000e37366004620041e6565b62002e8f565b34801562000e4a57600080fd5b50d3801562000e5857600080fd5b50d2801562000e6657600080fd5b50620004bf62000e7836600462004507565b62002ea4565b34801562000e8b57600080fd5b50d3801562000e9957600080fd5b50d2801562000ea757600080fd5b5062000ebf62000eb936600462004507565b62002efd565b60405162000504969594939291906200517b565b34801562000ee057600080fd5b50d3801562000eee57600080fd5b50d2801562000efc57600080fd5b50620004bf62000f0e36600462004507565b62003014565b34801562000f2157600080fd5b50d3801562000f2f57600080fd5b50d2801562000f3d57600080fd5b50620004bf62000f4f366004620044e6565b6200306d565b34801562000f6257600080fd5b50d3801562000f7057600080fd5b50d2801562000f7e57600080fd5b50620004bf62000f9036600462004507565b620030ad565b34801562000fa357600080fd5b50d3801562000fb157600080fd5b50d2801562000fbf57600080fd5b5062000645620030df565b34801562000fd757600080fd5b50d3801562000fe557600080fd5b50d2801562000ff357600080fd5b506200064562001005366004620041e6565b620030e5565b3480156200101857600080fd5b50d380156200102657600080fd5b50d280156200103457600080fd5b50620004bf6200104636600462004528565b620030f7565b3480156200105957600080fd5b50d380156200106757600080fd5b50d280156200107557600080fd5b506200088f6200108736600462004507565b62003237565b3480156200109a57600080fd5b50d38015620010a857600080fd5b50d28015620010b657600080fd5b50620006d6620010c8366004620041e6565b62003256565b348015620010db57600080fd5b50d38015620010e957600080fd5b50d28015620010f757600080fd5b50620004bf6200110936600462004507565b62003271565b3480156200111c57600080fd5b50d380156200112a57600080fd5b50d280156200113857600080fd5b50620004bf6200114a366004620041e6565b620032a8565b3480156200115d57600080fd5b50d380156200116b57600080fd5b50d280156200117957600080fd5b50620004bf6200118b366004620042ba565b6200336a565b3480156200119e57600080fd5b50d38015620011ac57600080fd5b50d28015620011ba57600080fd5b50620004f5620011cc36600462004507565b620033ea565b348015620011df57600080fd5b50d38015620011ed57600080fd5b50d28015620011fb57600080fd5b506200064562003402565b3480156200121357600080fd5b50d380156200122157600080fd5b50d280156200122f57600080fd5b50620004bf62001241366004620043f5565b62003408565b3480156200125457600080fd5b50d380156200126257600080fd5b50d280156200127057600080fd5b50620004bf62001282366004620041e6565b620034bb565b3480156200129557600080fd5b50d38015620012a357600080fd5b50d28015620012b157600080fd5b506200088f620012c336600462004507565b620035b5565b348015620012d657600080fd5b50d38015620012e457600080fd5b50d28015620012f257600080fd5b50620004bf62001304366004620041e6565b620035d4565b6001546001600160a01b03163314620013375760405162461bcd60e51b8152600401620004309062005391565b600855565b600c54610100900460ff1681565b6001546001600160a01b03163314620013775760405162461bcd60e51b8152600401620004309062005391565b6001600160a01b038116620013a05760405162461bcd60e51b815260040162000430906200540f565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60106020526000908152604090205460ff1681565b6001600160a01b038116600090815260186020526040908190205490517f868ad677590bc2791bdee23c70e0ca2506c208db96d6973637b0a1e46182d892916200142191620054b1565b60405180910390a150565b60009081526012602052604090206004015460ff1690565b6009545b90565b600c54610100900460ff1615620014765760405162461bcd60e51b815260040162000430906200535b565b3360009081526011602052604090205460ff16620014a85760405162461bcd60e51b815260040162000430906200536d565b620014b4828262003622565b620014bf5762001593565b600060168381548110620014cf57fe5b60009182526020808320600590920290910180546002820154600383015460405193965062001511946001600160a01b03909316939192909189910162004f6a565b60405160208183030381529060405280519060200120905062001535848262003711565b1562001590578154600283015460038401546040517fe602f8e08fc6d15b2241c6261e66e1a122de12e279a8e3f1ae4dc2030846ad9a9362001587936001600160a01b039091169290918990620051e1565b60405180910390a15b50505b5050565b600f8181548110620015a557fe5b6000918252602090912001546001600160a01b0316905081565b60075481565b60085481565b600f5490565b600c54610100900460ff1615620015fc5760405162461bcd60e51b815260040162000430906200535b565b3360009081526011602052604090205460ff166200162e5760405162461bcd60e51b815260040162000430906200536d565b620f424086118015620016435750621e848086105b620016625760405162461bcd60e51b81526004016200043090620052ef565b60006200166f82620037e1565b905080156200168957620016898888888888888862003889565b5050505050505050565b6001546001600160a01b03163314620016c05760405162461bcd60e51b8152600401620004309062005391565b600755565b600d602052600090815260409020546001600160a01b031681565b600c5460009060ff1615620017095760405162461bcd60e51b8152600401620004309062005349565b600c54610100900460ff1615620017345760405162461bcd60e51b815260040162000430906200535b565b333214620017565760405162461bcd60e51b815260040162000430906200537f565b600954600654013410156200177f5760405162461bcd60e51b81526004016200043090620053fd565b34156200179357600954600b805490910190555b6009546040805160c0810182523381526000602082018181529282018181523494909403606083018181526080840183815260a0850184905260168054600180820180845592909652865160059091027fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b5124289810180546001600160a01b039384166001600160a01b031991821617825599517fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428a83018054919094169a169990991790915597517fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428b89015591517fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428c880155517fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428d909601805492969195939192909160ff1990911690836003811115620018e657fe5b021790555060a082015160048201805461ff0019166101008360038111156200190b57fe5b0217905550506040516000925083156108fc029150839083818181858288f1935050505015801562001941573d6000803e3d6000fd5b507f8b605c1d46a95857320754587b24cee1ff155aa8babb37ddc176c83fe9b72b7833826001601680549050036040516200197f93929190620050d1565b60405180910390a150506016546000190190565b6012602052600090815260409020600381015460049091015460ff1682565b600c54610100900460ff1615620019dd5760405162461bcd60e51b815260040162000430906200535b565b3360009081526011602052604090205460ff1662001a0f5760405162461bcd60e51b815260040162000430906200536d565b6001600160a01b038084166000908152600d6020526040902054168062001a4a5760405162461bcd60e51b8152600401620004309062005445565b600062001a5783620037e1565b9050801562001a6e5762001a6e8683868662003a02565b505050505050565b600a5481565b600c5460009060ff161562001aa55760405162461bcd60e51b8152600401620004309062005349565b600c54610100900460ff161562001ad05760405162461bcd60e51b815260040162000430906200535b565b336000908152600e60205260409020546001600160a01b03168062001b095760405162461bcd60e51b8152600401620004309062005301565b60085483101562001b2e5760405162461bcd60e51b8152600401620004309062005421565b341562001b3e57600b8054340190555b60166040518060c00160405280866001600160a01b03168152602001836001600160a01b03168152602001600081526020018581526020016002600381111562001b8457fe5b815260200160009052815460018082018085556000948552602094859020845160059094020180546001600160a01b03199081166001600160a01b0395861617825595850151818401805490971694169390931790945560408301516002830155606083015160038084019190915560808401516004840180549193909260ff1990921691849081111562001c1557fe5b021790555060a082015160048201805461ff00191661010083600381111562001c3a57fe5b021790555050604051630852cd8d60e31b81523392506342966c68915062001c67908690600401620054b1565b600060405180830381600087803b15801562001c8257600080fd5b505af115801562001c97573d6000803e3d6000fd5b50506016546040517f70e60276a5e6e928d9393ec199889aa3310759e9b03135fa91aa8c495e5feaae935062001cd9925087918591889160001901906200515c565b60405180910390a150506016546000190192915050565b60008282d3821462001d165760405162461bcd60e51b81526004016200043090620053d9565bd2811462001d385760405162461bcd60e51b81526004016200043090620052dd565b600c5460ff161562001d5e5760405162461bcd60e51b8152600401620004309062005349565b600c54610100900460ff161562001d895760405162461bcd60e51b815260040162000430906200535b565b33321462001dab5760405162461bcd60e51b815260040162000430906200537f565bd360009081526010602052604090205460ff1662001ddd5760405162461bcd60e51b8152600401620004309062005313565b600754d2101562001e025760405162461bcd60e51b8152600401620004309062005325565b60095434101562001e275760405162461bcd60e51b81526004016200043090620053a3565b60095434111562001e65576009546040513391340380156108fc02916000818181858888f1935050505015801562001e63573d6000803e3d6000fd5b505b341562001e7957600954600b805490910190555b6040805160c081018252338152600060208201818152d3938301938452d26060840190815260016080850181815260a086018590526016805480840180835591909652865160059096027fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b5124289810180546001600160a01b039889166001600160a01b031991821617825596517fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428a830180549190991697169690961790965596517fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428b86015591517fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428c85015590517fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428d9093018054929392909160ff199091169083600381111562001fc357fe5b021790555060a082015160048201805461ff00191661010083600381111562001fe857fe5b0217905550600092505050d280156108fc0290d3801580156200200a57600080fd5b50806001603f1b111580156200201f57600080fd5b5080620f4240101580156200203357600080fd5b50604051600081818185878a8ad094505050505015801562002059573d6000803e3d6000fd5b506016546040517f233ef90f4fff74796ce2477f1070c9080c6ef0d026bf12c7e85885dee69f06f89162002098913391d391d291600019019062005094565b60405180910390a15050601654600019019392505050565b60175481565b600c54610100900460ff1615620020e15760405162461bcd60e51b815260040162000430906200535b565b3360009081526011602052604090205460ff16620021135760405162461bcd60e51b815260040162000430906200536d565b6200211f828262003622565b6200212a5762001593565b6000601683815481106200213a57fe5b6000918252602080832060059092029091018054600382015460405192955062002175936001600160a01b0390921692909188910162004f9c565b60405160208183030381529060405280519060200120905062002199848262003711565b156200159057815460038301546040517f072bf1cba078d9b0cc566f8aebf5517516d66da00b2c0d9146cd25334b119a749262001587926001600160a01b0390911691889062005210565b6001546001600160a01b03163314620022115760405162461bcd60e51b8152600401620004309062005391565b600c80549115156101000261ff0019909216919091179055565b600c54610100900460ff1615620022565760405162461bcd60e51b815260040162000430906200535b565b3360009081526011602052604090205460ff16620022885760405162461bcd60e51b815260040162000430906200536d565b62002294828262003622565b6200229f5762001593565b600060168381548110620022af57fe5b600091825260208083206005909202909101805460018201546003830154604051939650620022f4946001600160a01b03938416949290931692909189910162004f1a565b60405160208183030381529060405280519060200120905062002318848262003711565b1562001590578154600183015460038401546040517fa356e11167fba9db9c7e29c60fcc4da0925f1174dbc1d55b9dfa615f7a91183f9362001587936001600160a01b039182169391169189906200515c565b6003546001600160a01b031681565b600c54610100900460ff1615620023a55760405162461bcd60e51b815260040162000430906200535b565b3360009081526011602052604090205460ff16620023d75760405162461bcd60e51b815260040162000430906200536d565b6003546001600160a01b0385811691161415620024085760405162461bcd60e51b815260040162000430906200548d565b6000620024158262003a9d565b905080156200242c576200242c8585858562003acc565b5050505050565b600b5481565b6001546001600160a01b03163314620024665760405162461bcd60e51b8152600401620004309062005391565b6001600160a01b03811660009081526011602052604090205460ff16620024a15760405162461bcd60e51b8152600401620004309062005337565b6001600160a01b03166000908152601160205260409020805460ff1916905560028054600019019055565b600081815260136020908152604080832060018101805483518186028101860190945280845260609586959294600290940193928592919084015b82821015620025b85760008481526020908190208301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015620025a35780601f106200257757610100808354040283529160200191620025a3565b820191906000526020600020905b8154815290600101906020018083116200258557829003601f168201915b50505050508152602001906001019062002507565b505050509150808054806020026020016040519081016040528092919081815260200182805480156200261557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311620025f6575b5050505050905091509150915091565b600c54610100900460ff1615620026505760405162461bcd60e51b815260040162000430906200535b565b3360009081526011602052604090205460ff16620026825760405162461bcd60e51b815260040162000430906200536d565b6001600160a01b038084166000908152600d60205260409020541680620026bd5760405162461bcd60e51b8152600401620004309062005445565b6000620026ca83620037e1565b9050801562001a6e5762001a6e8683868662003c24565b600c5460ff1681565b60025481565b6001546001600160a01b031681565b6001600160a01b03909116600090815260186020526040902055565b6000546001600160a01b031681565b600c5460ff1615620027505760405162461bcd60e51b8152600401620004309062005349565b600c54610100900460ff16156200277b5760405162461bcd60e51b815260040162000430906200535b565b3332146200279d5760405162461bcd60e51b815260040162000430906200537f565b600a54341015620027c25760405162461bcd60e51b8152600401620004309062005433565b600a543411156200280057600a546040513391340380156108fc02916000818181858888f19350505050158015620027fe573d6000803e3d6000fd5b505b600a54600b805490910190556016548110620028305760405162461bcd60e51b81526004016200043090620053b5565b6000601682815481106200284057fe5b6000918252602090912060059091020190506001600482015460ff1660038111156200286857fe5b14156200293f5760008281526013602052604090206004015460ff1615620028e4578054600282015460038301546040517fe602f8e08fc6d15b2241c6261e66e1a122de12e279a8e3f1ae4dc2030846ad9a93620028d6936001600160a01b039091169290918790620051e1565b60405180910390a162002939565b8054600282015460038301546040517f233ef90f4fff74796ce2477f1070c9080c6ef0d026bf12c7e85885dee69f06f89362002930936001600160a01b039091169290918790620051e1565b60405180910390a15b62001593565b6002600482015460ff1660038111156200295557fe5b141562002a115760008281526013602052604090206004015460ff1615620029c4578054600182015460038301546040517f447a43cd233d7bec0e836b62f3b956ef1e511d76e9c9bb869bff4f2191ea962693620028d6936001600160a01b039182169391169187906200515c565b8054600182015460038301546040517f70e60276a5e6e928d9393ec199889aa3310759e9b03135fa91aa8c495e5feaae9362002930936001600160a01b039182169391169187906200515c565b6003600482015460ff16600381111562002a2757fe5b141562002ae35760008281526013602052604090206004015460ff161562002a96578054600182015460038301546040517fa356e11167fba9db9c7e29c60fcc4da0925f1174dbc1d55b9dfa615f7a91183f93620028d6936001600160a01b039182169391169187906200515c565b8054600182015460038301546040517f9eba2209f8d644d656032105b0723bfa9ec5171cf31aab76c9957bff8eb4a6339362002930936001600160a01b039182169391169187906200515c565b60008281526013602052604090206004015460ff161562002b4357805460038201546040517f072bf1cba078d9b0cc566f8aebf5517516d66da00b2c0d9146cd25334b119a749262002930926001600160a01b0390911691869062005210565b805460038201546040517f8b605c1d46a95857320754587b24cee1ff155aa8babb37ddc176c83fe9b72b789262002b88926001600160a01b0390911691869062005210565b60405180910390a15050565b604080518082019091526005815264312e302e3160d81b602082015290565b6060600f80548060200260200160405190810160405280929190818152602001828054801562002c0d57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162002bee575b5050505050905090565b600c5460009060ff161562002c405760405162461bcd60e51b8152600401620004309062005349565b600c54610100900460ff161562002c6b5760405162461bcd60e51b815260040162000430906200535b565b336000908152600e60205260409020546001600160a01b03168062002ca45760405162461bcd60e51b8152600401620004309062005301565b341562002cb457600b8054340190555b60166040518060c00160405280866001600160a01b03168152602001836001600160a01b031681526020016000815260200185815260200160038081111562002cf957fe5b815260200160009052815460018082018085556000948552602094859020845160059094020180546001600160a01b03199081166001600160a01b0395861617825595850151818401805490971694169390931790945560408301516002830155606083015160038084019190915560808401516004840180549193909260ff1990921691849081111562002d8a57fe5b021790555060a082015160048201805461ff00191661010083600381111562002daf57fe5b021790555050604051630852cd8d60e31b81523392506342966c68915062002ddc908690600401620054b1565b600060405180830381600087803b15801562002df757600080fd5b505af115801562002e0c573d6000803e3d6000fd5b50506016546040517f9eba2209f8d644d656032105b0723bfa9ec5171cf31aab76c9957bff8eb4a633935062001cd9925087918591889160001901906200515c565b6001600160a01b03811660009081526011602052604090205460ff165b919050565b6015602052600090815260409020600381015460049091015460ff1682565b60116020526000908152604090205460ff1681565b6001546001600160a01b0316331462002ed15760405162461bcd60e51b8152600401620004309062005391565b6305f5e10081111562002ef85760405162461bcd60e51b815260040162000430906200547b565b600955565b60008060008060008062002f1062004051565b6016888154811062002f1e57fe5b60009182526020918290206040805160c081018252600590930290910180546001600160a01b0390811684526001820154169383019390935260028301549082015260038083015460608301526004830154919291608084019160ff9091169081111562002f8857fe5b600381111562002f9457fe5b81526020016004820160019054906101000a900460ff16600381111562002fb757fe5b600381111562002fc357fe5b81525050905080600001518160200151826040015183606001518460800151600381111562002fee57fe5b8560a00151600381111562002fff57fe5b949d939c50919a509850965090945092505050565b6001546001600160a01b03163314620030415760405162461bcd60e51b8152600401620004309062005391565b6305f5e100811115620030685760405162461bcd60e51b815260040162000430906200547b565b600a55565b6001546001600160a01b031633146200309a5760405162461bcd60e51b8152600401620004309062005391565b600c805460ff1916911515919091179055565b6001546001600160a01b03163314620030da5760405162461bcd60e51b8152600401620004309062005391565b600655565b60065481565b60186020526000908152604090205481565b600c54610100900460ff1615620031225760405162461bcd60e51b815260040162000430906200535b565b3360009081526011602052604090205460ff16620031545760405162461bcd60e51b815260040162000430906200536d565b62003160828262003622565b6200316b5762001593565b6000601683815481106200317b57fe5b600091825260208083206005909202909101805460018201546003830154604051939650620031c0946001600160a01b03938416949290931692909189910162004f1a565b604051602081830303815290604052805190602001209050620031e4848262003711565b1562001590578154600183015460038401546040517f447a43cd233d7bec0e836b62f3b956ef1e511d76e9c9bb869bff4f2191ea96269362001587936001600160a01b039182169391169189906200515c565b6014602052600090815260409020600381015460049091015460ff1682565b600e602052600090815260409020546001600160a01b031681565b60178190556040517fef0cee5ab0ba082f9e7e2bec12702da8220ed5e3df2a40dfd209f30629dde0029062001421908390620054b1565b6001546001600160a01b03163314620032d55760405162461bcd60e51b8152600401620004309062005391565b6001600160a01b038116620032fe5760405162461bcd60e51b81526004016200043090620053eb565b6001600160a01b03811660009081526011602052604090205460ff16156200333a5760405162461bcd60e51b8152600401620004309062005457565b6001600160a01b03166000908152601160205260409020805460ff19166001908117909155600280549091019055565b600c54610100900460ff1615620033955760405162461bcd60e51b815260040162000430906200535b565b3360009081526011602052604090205460ff16620033c75760405162461bcd60e51b815260040162000430906200536d565b6000620033d482620037e1565b9050801562001590576200159084848462003cbf565b60009081526014602052604090206004015460ff1690565b60095481565b600c54610100900460ff1615620034335760405162461bcd60e51b815260040162000430906200535b565b3360009081526011602052604090205460ff16620034655760405162461bcd60e51b815260040162000430906200536d565b6003546001600160a01b0386811691161415620034965760405162461bcd60e51b815260040162000430906200548d565b6000620034a38262003a9d565b9050801562001a6e5762001a6e868686868662003dbe565b6000546001600160a01b0316156200357a57600080546040516060916001600160a01b031690620034f0908490369062004fd9565b600060405180830381855af49150503d80600081146200352d576040519150601f19603f3d011682016040523d82523d6000602084013e62003532565b606091505b50915091507f8d47f8674d94f113f1cc97d30d1540c9ad6eeb7e7deacf67b41cc6032e4a57d382826040516200356a9291906200526c565b60405180910390a15050620035b2565b6001546001600160a01b03163314620035a75760405162461bcd60e51b8152600401620004309062005391565b620035b28162003f19565b50565b6013602052600090815260409020600381015460049091015460ff1682565b3360009081526011602052604090205460ff16620036065760405162461bcd60e51b815260040162000430906200536d565b620036118162003f89565b15620035b257620035b28162003fc2565b60008281526013602090815260408083203384529182905282205460ff1615620036515760009150506200370b565b336000908152602082815260408220805460ff191660019081179091558381018054918201808255908452928290208651620036969391909201919087019062004086565b505060028101805460018181018355600092835260209092200180546001600160a01b031916331790556003820180549091019055600481015460ff16158015620036f45750600360025460020281620036ec57fe5b048160030154115b15620037055760019150506200370b565b60009150505b92915050565b6000828152601360205260408120600481015460ff1615620037385760009150506200370b565b6000600984836001018460020160405160008152602001604052604051620037639392919062005290565b6020604051602081039080840390855afa15801562003786573d6000803e3d6000fd5b50505060206040510351905060006200379f826200402d565b9050600360025460020281620037b157fe5b04811115620037d5575050600401805460ff1916600190811790915590506200370b565b50600095945050505050565b60008181526012602090815260408083203384529182905282205460ff16156200381057600091505062002e6b565b336000908152602082905260409020805460ff191660019081179091556003820180549091019055600481015460ff161580156200386157506003600254600202816200385957fe5b048160030154115b156200388057600401805460ff19166001908117909155905062002e6b565b50600092915050565b600086815260106020526040902054869060ff16620038bc576000818152601060205260409020805460ff191660011790555b6005546040516001600160a01b0390911690620038e69088908490899089908990602001620054e0565b60408051601f1981840301815290829052620039029162004fe8565b6000604051808303816000865af19150503d806000811462003941576040519150601f19603f3d011682016040523d82523d6000602084013e62003946565b606091505b5050506001600160a01b0388166108fc8715028783801580156200396957600080fd5b50806001603f1b111580156200397e57600080fd5b5080620f4240101580156200399257600080fd5b50604051600081818185878a8ad0945050505050158015620039b8573d6000803e3d6000fd5b507f4abc2f5e7912b009fa6b5f692abd5f5da841ba2c81f7b734c1b0f5ff603b77bf88828885604051620039f09493929190620050ff565b60405180910390a15050505050505050565b6040516340c10f1960e01b81526001600160a01b038416906340c10f199062003a329087908690600401620051f1565b600060405180830381600087803b15801562003a4d57600080fd5b505af115801562003a62573d6000803e3d6000fd5b505050507fc3e8d45c84c4ddcecd426c61ae7c123f45b727c357f607b64c030967a21e0782848484846040516200158794939291906200515c565b60008181526014602090815260408083203384529182905282205460ff16156200381057600091505062002e6b565b6001600160a01b038481166000908152600d6020526040902054161562003b075760405162461bcd60e51b8152600401620004309062005469565b600030848460405162003b1a906200410b565b62003b289392919062005006565b604051809103906000f08015801562003b45573d6000803e3d6000fd5b506001600160a01b038087166000818152600d6020908152604080832080549587166001600160a01b031996871681179091558352600e909152908190208054909316909117909155519091507f5a730d2f8cfe24a7b618d8f78e5b279bab65e7c34e971669d168aec0a7f446229062003bc5908790849086906200513d565b60405180910390a15050600f80546001810182556000919091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8020180546001600160a01b0319166001600160a01b0394909416939093179092555050565b6040516340c10f1960e01b81526001600160a01b038416906340c10f199062003c549087908690600401620051f1565b600060405180830381600087803b15801562003c6f57600080fd5b505af115801562003c84573d6000803e3d6000fd5b505050507ff688f64a0db435b05bf90916e3d704b4eb942c59bc55529e58f09df8e65243c4848484846040516200158794939291906200515c565b6004546040516001600160a01b039091169062003ce1908490602001620054b1565b60408051601f198184030181529082905262003cfd9162004fe8565b6000604051808303816000865af19150503d806000811462003d3c576040519150601f19603f3d011682016040523d82523d6000602084013e62003d41565b606091505b50506040516001600160a01b038516915083156108fc029084906000818181858888f1935050505015801562003d7b573d6000803e3d6000fd5b507f93db373aca7b5fa97756430b1c2ccd69d67815387387feb40d87aa48cbb2571a83838360405162003db193929190620050d1565b60405180910390a1505050565b6001600160a01b038581166000908152600d6020526040902054161562003df95760405162461bcd60e51b815260040162000430906200549f565b60003085858560405162003e0d9062004119565b62003e1c949392919062005049565b604051809103906000f08015801562003e39573d6000803e3d6000fd5b506001600160a01b038088166000818152600d6020908152604080832080549587166001600160a01b031996871681179091558352600e909152908190208054909316909117909155519091507ff60ccfdcd368d2f04ad506885af100a8d3ab13d9becee776d6d1b09d6b21d3a59062003eb9908890849086906200513d565b60405180910390a15050600f80546001810182556000919091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8020180546001600160a01b0319166001600160a01b039590951694909417909355505050565b6001600160a01b03811662003f2d57600080fd5b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526015602090815260408083203384529182905282205460ff16156200381057600091505062002e6b565b6000546040517f5c36dec2c0ed5b0dbd63872444c637e531efe754847dc745234e3a77b5383ffb9162004003916001600160a01b039091169084906200511e565b60405180910390a1600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000815b80156200404b576001919091019060001981011662004031565b50919050565b6040805160c0810182526000808252602082018190529181018290526060810182905290608082019081526020016000905290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620040c957805160ff1916838001178555620040f9565b82800160010185558215620040f9579182015b82811115620040f9578251825591602001919060010190620040dc565b506200410792915062004127565b5090565b610fe180620056be83390190565b610ef5806200669f83390190565b6200144891905b808211156200410757600081556001016200412e565b8035620041518162005685565b6200415c81620055bc565b9392505050565b80356200370b816200569c565b80356200370b81620056a7565b600082601f8301126200418f57600080fd5b8135620041a6620041a0826200555e565b62005536565b91508082526020830160208301858383011115620041c357600080fd5b620041d083828462005601565b50505092915050565b80356200370b81620056b2565b600060208284031215620041f957600080fd5b600062004207848462004144565b949350505050565b600080600080600080600060e0888a0312156200422b57600080fd5b6000620042398a8a62004144565b97505060206200424c8a828b0162004170565b96505060406200425f8a828b0162004170565b9550506060620042728a828b0162004170565b9450506080620042858a828b0162004170565b93505060a0620042988a828b01620041d9565b92505060c0620042ab8a828b0162004170565b91505092959891949750929550565b600080600060608486031215620042d057600080fd5b6000620042de868662004144565b9350506020620042f18682870162004170565b9250506040620043048682870162004170565b9150509250925092565b600080600080608085870312156200432557600080fd5b600062004333878762004144565b9450506020620043468782880162004144565b9350506040620043598782880162004170565b92505060606200436c8782880162004170565b91505092959194509250565b600080600080608085870312156200438f57600080fd5b60006200439d878762004144565b945050602085013567ffffffffffffffff811115620043bb57600080fd5b620043c9878288016200417d565b935050604085013567ffffffffffffffff811115620043e757600080fd5b62004359878288016200417d565b600080600080600060a086880312156200440e57600080fd5b60006200441c888862004144565b955050602086013567ffffffffffffffff8111156200443a57600080fd5b62004448888289016200417d565b945050604086013567ffffffffffffffff8111156200446657600080fd5b62004474888289016200417d565b93505060606200448788828901620041d9565b92505060806200449a8882890162004170565b9150509295509295909350565b60008060408385031215620044bb57600080fd5b6000620044c9858562004144565b9250506020620044dc8582860162004170565b9150509250929050565b600060208284031215620044f957600080fd5b600062004207848462004163565b6000602082840312156200451a57600080fd5b600062004207848462004170565b600080604083850312156200453c57600080fd5b60006200454a858562004170565b925050602083013567ffffffffffffffff8111156200456857600080fd5b620044dc858286016200417d565b600080604083850312156200458a57600080fd5b6000620044c9858562004170565b6000620045a68383620045db565b505060200190565b60006200415c8383620047e2565b60006200415c838362004857565b620045d581620055e0565b82525050565b620045d581620055bc565b620045d5620045f582620055bc565b62005653565b6000620046088262005599565b620046148185620055a7565b9350620046218362005587565b8060005b83811015620046555781516200463c888262004598565b9750620046498362005587565b92505060010162004625565b509495945050505050565b60006200466d826200559d565b620046798185620055a7565b935062004686836200558d565b8060005b8381101562004655576200469e8262005667565b620046aa888262004598565b9750620046b783620055a1565b9250506001016200468a565b6000620046d08262005599565b620046dc8185620055a7565b935083602082028501620046f08562005587565b8060005b85811015620047305784840389528151620047108582620045ae565b94506200471d8362005587565b60209a909a0199925050600101620046f4565b5091979650505050505050565b60006200474a826200559d565b620047568185620055a7565b9350836020820285016200476a856200558d565b8060005b858110156200473057848403895281620047898582620045bc565b94506200479683620055a1565b60209a909a01999250506001016200476e565b620045d581620055c9565b620045d58162001448565b6000620047cd838562002e6b565b9350620047dc83858462005601565b50500190565b6000620047ef8262005599565b620047fb8185620055a7565b93506200480d8185602086016200560d565b620048188162005675565b9093019392505050565b60006200482f8262005599565b6200483b818562002e6b565b93506200484d8185602086016200560d565b9290920192915050565b600081546001811660008114620048775760018114620048a057620048e5565b607f60028304166200488a8187620055a7565b60ff1984168152955050602085019250620048e5565b60028204620048b08187620055a7565b9550620048bd856200558d565b60005b82811015620048de57815488820152600190910190602001620048c0565b8701945050505b505092915050565b6000620048fc601c83620055a7565b7f746f6b656e56616c756520213d206d73672e746f6b656e76616c756500000000815260200192915050565b600062004937602883620055a7565b7f746f6b656e4964203c3d2031303030303030206f7220746f6b656e4964203e3d815267020323030303030360c41b602082015260400192915050565b600062004983601e83620055a7565b7f6d61696e436861696e41646472657373203d3d20616464726573732830290000815260200192915050565b6000620049be602183620055a7565b7f746f6b656e49644d61705b606d73672e746f6b656e69645d203d3d2066616c738152606560f81b602082015260400192915050565b600062004a03602683620055a7565b7f746f6b656e76616c7565206d757374206265203e3d2077697468647261774d6981526506e54726331360d41b602082015260400192915050565b600062004a4d601583620055a7565b745f6f7261636c65206973206e6f74206f7261636c6560581b815260200192915050565b600062004a80600d83620055a7565b6c7061757365206973207472756560981b815260200192915050565b600062004aab600c83620055a7565b6b73746f70206973207472756560a01b815260200192915050565b600062004ad5601c83620055a7565b7f6f7261636c65735b6d73672e73656e6465725d2069732066616c736500000000815260200192915050565b600062004b10601283620055a7565b711b9bdd08185b1b1bddc818dbdb9d1c9858dd60721b815260200192915050565b600062004b40601383620055a7565b7236b9b39739b2b73232b910109e9037bbb732b960691b815260200192915050565b600062004b71601c83620055a7565b7f76616c7565206d757374206265203e3d20776974686472617746656500000000815260200192915050565b600062004bac602083620055a7565b7f6e6f6e6365203e3d207573657257697468647261774c6973742e6c656e677468815260200192915050565b600062004be7601b83620055a7565b7f6e6f7420616c6c6f772066756e6374696f6e2066616c6c6261636b0000000000815260200192915050565b600062004c22601683620055a7565b751d1bdad95b925908084f481b5cd9cb9d1bdad95b9a5960521b815260200192915050565b600062004c56601b83620055a7565b7f7468697320616464726573732063616e6e6f74206265207a65726f0000000000815260200192915050565b600062004c91602b83620055a7565b7f76616c7565206d757374206265203e3d2077697468647261774d696e5472782b81526a776974686472617746656560a81b602082015260400192915050565b600062004ce0601e83620055a7565b7f5f73756e546f6b656e41646472657373203d3d20616464726573732830290000815260200192915050565b600062004d1b602183620055a7565b7f76616c7565206d757374206265203e3d2077697468647261774d696e547263328152600360fc1b602082015260400192915050565b600062004d60601b83620055a7565b7f6d73672e76616c7565206e65656420203e3d2072657472794665650000000000815260200192915050565b600062004d9b602483620055a7565b7f746865206d61696e20636861696e2061646472657373206861736e2774206d618152631c1c195960e21b602082015260400192915050565b600062004de3601183620055a7565b705f6f7261636c65206973206f7261636c6560781b815260200192915050565b600062004e12601983620055a7565b7f54524337323120636f6e7472616374206973206d617070656400000000000000815260200192915050565b600062004e4d601183620055a7565b700d8cae6e640e8d0c2dc4062606040a8a4b607b1b815260200192915050565b600062004e7c602383620055a7565b7f6d61696e436861696e41646472657373203d3d2073756e546f6b656e4164647281526265737360e81b602082015260400192915050565b600062004ec3601883620055a7565b7f545243323020636f6e7472616374206973206d61707065640000000000000000815260200192915050565b620045d562004efe8262001448565b62001448565b620045d581620055f4565b620045d581620055da565b600062004f288287620045e6565b60148201915062004f3a8286620045e6565b60148201915062004f4c828562004eef565b60208201915062004f5e828462004eef565b50602001949350505050565b600062004f788287620045e6565b60148201915062004f8a828662004eef565b60208201915062004f4c828562004eef565b600062004faa8286620045e6565b60148201915062004fbc828562004eef565b60208201915062004fce828462004eef565b506020019392505050565b600062004207828486620047bf565b60006200415c828462004822565b602081016200370b8284620045db565b60608101620050168286620045ca565b81810360208301526200502a8185620047e2565b90508181036040830152620050408184620047e2565b95945050505050565b60808101620050598287620045ca565b81810360208301526200506d8186620047e2565b90508181036040830152620050838185620047e2565b905062005040606083018462004f0f565b60808101620050a48287620045ca565b620050b36020830186620047b4565b620050c26040830185620047b4565b620050406060830184620047b4565b60608101620050e18286620045ca565b620050f06020830185620047b4565b620042076040830184620047b4565b608081016200510f8287620045ca565b620050b3602083018662004f04565b604081016200512e8285620045db565b6200415c6020830184620045db565b606081016200514d8286620045db565b620050f06020830185620045db565b608081016200516c8287620045db565b620050b36020830186620045db565b60c081016200518b8289620045db565b6200519a6020830188620045db565b620051a96040830187620047b4565b620051b86060830186620047b4565b620051c76080830185620047b4565b620051d660a0830184620047b4565b979650505050505050565b60808101620050a48287620045db565b60408101620052018285620045db565b6200415c6020830184620047b4565b60608101620050e18286620045db565b602080825281016200415c8184620045fb565b60408082528101620052468185620046c3565b90508181036020830152620042078184620045fb565b602081016200370b8284620047a9565b604081016200527c8285620047a9565b8181036020830152620042078184620047e2565b60608101620052a08286620047b4565b8181036020830152620052b481856200473d565b9050818103604083015262005040818462004660565b602080825281016200415c8184620047e2565b602080825281016200370b81620048ed565b602080825281016200370b8162004928565b602080825281016200370b8162004974565b602080825281016200370b81620049af565b602080825281016200370b81620049f4565b602080825281016200370b8162004a3e565b602080825281016200370b8162004a71565b602080825281016200370b8162004a9c565b602080825281016200370b8162004ac6565b602080825281016200370b8162004b01565b602080825281016200370b8162004b31565b602080825281016200370b8162004b62565b602080825281016200370b8162004b9d565b602080825281016200370b8162004bd8565b602080825281016200370b8162004c13565b602080825281016200370b8162004c47565b602080825281016200370b8162004c82565b602080825281016200370b8162004cd1565b602080825281016200370b8162004d0c565b602080825281016200370b8162004d51565b602080825281016200370b8162004d8c565b602080825281016200370b8162004dd4565b602080825281016200370b8162004e03565b602080825281016200370b8162004e3e565b602080825281016200370b8162004e6d565b602080825281016200370b8162004eb4565b602081016200370b8284620047b4565b60408101620054d18285620047b4565b6200415c6020830184620047a9565b60a08101620054f08288620047b4565b620054ff6020830187620047b4565b6200550e6040830186620047b4565b6200551d6060830185620047b4565b6200552c608083018462004f0f565b9695505050505050565b60405181810167ffffffffffffffff811182821017156200555657600080fd5b604052919050565b600067ffffffffffffffff8211156200557657600080fd5b506020601f91909101601f19160190565b60200190565b60009081526020902090565b5190565b5490565b60010190565b90815260200190565b6001600160a01b031690565b60006200370b82620055b0565b151590565b6001600160a81b031690565b60ff1690565b60006200370b8260006200370b82620055bc565b60006200370b8262001448565b82818337506000910152565b60005b838110156200562a57818101518382015260200162005610565b83811115620015905750506000910152565b60006200370b6200564d8362001448565b620055b0565b60006200370b8260006200370b826200567f565b60006200370b82546200563c565b601f01601f191690565b60601b90565b6200569081620055ce565b8114620035b257600080fd5b6200569081620055c9565b620056908162001448565b6200569081620055da56fe60806040523480156200001157600080fd5b50d380156200001f57600080fd5b50d280156200002d57600080fd5b5060405162000fe138038062000fe1833981810160405260608110156200005357600080fd5b8151602083018051919392830192916401000000008111156200007557600080fd5b820160208101848111156200008957600080fd5b8151640100000000811182820187101715620000a457600080fd5b50509291906020018051640100000000811115620000c157600080fd5b82016020810184811115620000d557600080fd5b8151640100000000811182820187101715620000f057600080fd5b5050600480546001600160a01b0319166001600160a01b038816179055845190935062000127925060059150602085019062000147565b5080516200013d90600690602084019062000147565b50505050620001ec565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200018a57805160ff1916838001178555620001ba565b82800160010185558215620001ba579182015b82811115620001ba5782518255916020019190600101906200019d565b50620001c8929150620001cc565b5090565b620001e991905b80821115620001c85760008155600101620001d3565b90565b610de580620001fc6000396000f3fe6080604052600436106100dd5760003560e01c80636352211e1161007f57806395d89b411161005957806395d89b411461041e578063a22cb4651461044d578063a9059cbb146104a2578063e985e9c5146104f5576100dd565b80636352211e1461035e57806370a08231146103a2578063835fc6ca14610401576100dd565b8063116191b6116100bb578063116191b61461023b57806323b872dd1461026a57806340c10f19146102c757806342966c681461031a576100dd565b806306fdde03146100e2578063081812fc14610186578063095ea7b3146101e6575b600080fd5b3480156100ee57600080fd5b50d380156100fb57600080fd5b50d2801561010857600080fd5b5061011161055e565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014b578181015183820152602001610133565b50505050905090810190601f1680156101785780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019257600080fd5b50d3801561019f57600080fd5b50d280156101ac57600080fd5b506101ca600480360360208110156101c357600080fd5b50356105ec565b604080516001600160a01b039092168252519081900360200190f35b3480156101f257600080fd5b50d380156101ff57600080fd5b50d2801561020c57600080fd5b506102396004803603604081101561022357600080fd5b506001600160a01b03813516906020013561061c565b005b34801561024757600080fd5b50d3801561025457600080fd5b50d2801561026157600080fd5b506101ca6106c9565b34801561027657600080fd5b50d3801561028357600080fd5b50d2801561029057600080fd5b50610239600480360360608110156102a757600080fd5b506001600160a01b038135811691602081013590911690604001356106d8565b3480156102d357600080fd5b50d380156102e057600080fd5b50d280156102ed57600080fd5b506102396004803603604081101561030457600080fd5b506001600160a01b0381351690602001356106fb565b34801561032657600080fd5b50d3801561033357600080fd5b50d2801561034057600080fd5b506102396004803603602081101561035757600080fd5b50356107c3565b34801561036a57600080fd5b50d3801561037757600080fd5b50d2801561038457600080fd5b506101ca6004803603602081101561039b57600080fd5b50356107d0565b3480156103ae57600080fd5b50d380156103bb57600080fd5b50d280156103c857600080fd5b506103ef600480360360208110156103df57600080fd5b50356001600160a01b03166107f8565b60408051918252519081900360200190f35b6103ef6004803603602081101561041757600080fd5b5035610829565b34801561042a57600080fd5b50d3801561043757600080fd5b50d2801561044457600080fd5b506101116109ca565b34801561045957600080fd5b50d3801561046657600080fd5b50d2801561047357600080fd5b506102396004803603604081101561048a57600080fd5b506001600160a01b0381351690602001351515610a25565b3480156104ae57600080fd5b50d380156104bb57600080fd5b50d280156104c857600080fd5b50610239600480360360408110156104df57600080fd5b506001600160a01b038135169060200135610aa9565b34801561050157600080fd5b50d3801561050e57600080fd5b50d2801561051b57600080fd5b5061054a6004803603604081101561053257600080fd5b506001600160a01b0381358116916020013516610ab8565b604080519115158252519081900360200190f35b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105e45780601f106105b9576101008083540402835291602001916105e4565b820191906000526020600020905b8154815290600101906020018083116105c757829003601f168201915b505050505081565b60006105f782610ae6565b61060057600080fd5b506000908152600160205260409020546001600160a01b031690565b6000610627826107d0565b9050806001600160a01b0316836001600160a01b0316141561064857600080fd5b336001600160a01b038216148061066457506106648133610ab8565b61066d57600080fd5b60008281526001602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6004546001600160a01b031681565b6106e23382610b03565b6106eb57600080fd5b6106f6838383610b62565b505050565b6004546001600160a01b0316331461071257600080fd5b6001600160a01b03821661072557600080fd5b61072e81610ae6565b1561073857600080fd5b60008181526020818152604080832080546001600160a01b0319166001600160a01b03871690811790915583526002909152902054610778906001610c6e565b6001600160a01b0383166000818152600260205260408082209390935591518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6107cd3382610c7e565b50565b6000818152602081905260408120546001600160a01b0316806107f257600080fd5b92915050565b60006001600160a01b03821661080d57600080fd5b506001600160a01b031660009081526002602052604090205490565b6004805460408051631540aa8960e01b8152905160009384936001600160a01b031692631540aa899281830192602092829003018186803b15801561086d57600080fd5b505afa158015610881573d6000803e3d6000fd5b505050506040513d602081101561089757600080fd5b50519050348111156108f0576040805162461bcd60e51b815260206004820152601c60248201527f76616c7565206d757374206265203e3d20776974686472617746656500000000604482015290519081900360640190fd5b803411156109295760405133903483900380156108fc02916000818181858888f19350505050158015610927573d6000803e3d6000fd5b505b60045461093f906001600160a01b031684610aa9565b600480546040805163546a1a8160e11b8152339381019390935260248301869052516001600160a01b039091169163a8d4350291849160448082019260209290919082900301818588803b15801561099657600080fd5b505af11580156109aa573d6000803e3d6000fd5b50505050506040513d60208110156109c157600080fd5b50519392505050565b6006805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105e45780601f106105b9576101008083540402835291602001916105e4565b6001600160a01b038216331415610a3b57600080fd5b3360008181526003602090815260408083206001600160a01b03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b610ab4338383610b62565b5050565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b6000908152602081905260409020546001600160a01b0316151590565b600080610b0f836107d0565b9050806001600160a01b0316846001600160a01b03161480610b4a5750836001600160a01b0316610b3f846105ec565b6001600160a01b0316145b80610b5a5750610b5a8185610ab8565b949350505050565b826001600160a01b0316610b75826107d0565b6001600160a01b031614610b8857600080fd5b6001600160a01b038216610b9b57600080fd5b610ba481610d3c565b6001600160a01b038316600090815260026020526040902054610bce90600163ffffffff610d7716565b6001600160a01b038085166000908152600260205260408082209390935590841681522054610c0490600163ffffffff610c6e16565b6001600160a01b0380841660008181526002602090815260408083209590955585825281905283812080546001600160a01b031916831790559251849391928716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b818101828110156107f257600080fd5b816001600160a01b0316610c91826107d0565b6001600160a01b031614610ca457600080fd5b610cad81610d3c565b6001600160a01b038216600090815260026020526040902054610cd790600163ffffffff610d7716565b6001600160a01b03831660008181526002602090815260408083209490945584825281905282812080546001600160a01b03191690559151839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000818152600160205260409020546001600160a01b0316156107cd57600090815260016020526040902080546001600160a01b0319169055565b600082821115610d8657600080fd5b5090039056fea26474726f6e58209b5e184957fd6af6da142fe8c1bf29bc8d8f5593031f8d9ee0d919c0452cb09b64736f6c637827302e352e392d646576656c6f702e323031392e382e32312b636f6d6d69742e3139303564373266005660806040523480156200001157600080fd5b50d380156200001f57600080fd5b50d280156200002d57600080fd5b5060405162000ef538038062000ef5833981810160405260808110156200005357600080fd5b8151602083018051919392830192916401000000008111156200007557600080fd5b820160208101848111156200008957600080fd5b8151640100000000811182820187101715620000a457600080fd5b50509291906020018051640100000000811115620000c157600080fd5b82016020810184811115620000d557600080fd5b8151640100000000811182820187101715620000f057600080fd5b5050602091820151600380546001600160a01b0319166001600160a01b038916179055855191945092506200012c916004919086019062000165565b5081516200014290600590602085019062000165565b506006805460ff191660ff9290921691909117905550506000600255506200020a565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001a857805160ff1916838001178555620001d8565b82800160010185558215620001d8579182015b82811115620001d8578251825591602001919060010190620001bb565b50620001e6929150620001ea565b5090565b6200020791905b80821115620001e65760008155600101620001f1565b90565b610cdb806200021a6000396000f3fe6080604052600436106100e85760003560e01c806340c10f191161008a57806395d89b411161005957806395d89b411461047c578063a457c2d7146104ab578063a9059cbb146104fe578063dd62ed3e14610551576100e8565b806340c10f191461037957806342966c68146103ce57806370a0823114610412578063835fc6ca1461045f576100e8565b806318160ddd116100c657806318160ddd1461024357806323b872dd14610284578063313ce567146102e15780633950935114610326576100e8565b806306fdde03146100ed578063095ea7b314610191578063116191b6146101f8575b600080fd5b3480156100f957600080fd5b50d3801561010657600080fd5b50d2801561011357600080fd5b5061011c6105a6565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015657818101518382015260200161013e565b50505050905090810190601f1680156101835780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019d57600080fd5b50d380156101aa57600080fd5b50d280156101b757600080fd5b506101e4600480360360408110156101ce57600080fd5b506001600160a01b038135169060200135610634565b604080519115158252519081900360200190f35b34801561020457600080fd5b50d3801561021157600080fd5b50d2801561021e57600080fd5b5061022761064a565b604080516001600160a01b039092168252519081900360200190f35b34801561024f57600080fd5b50d3801561025c57600080fd5b50d2801561026957600080fd5b50610272610659565b60408051918252519081900360200190f35b34801561029057600080fd5b50d3801561029d57600080fd5b50d280156102aa57600080fd5b506101e4600480360360608110156102c157600080fd5b506001600160a01b0381358116916020810135909116906040013561065f565b3480156102ed57600080fd5b50d380156102fa57600080fd5b50d2801561030757600080fd5b506103106106b6565b6040805160ff9092168252519081900360200190f35b34801561033257600080fd5b50d3801561033f57600080fd5b50d2801561034c57600080fd5b506101e46004803603604081101561036357600080fd5b506001600160a01b0381351690602001356106bf565b34801561038557600080fd5b50d3801561039257600080fd5b50d2801561039f57600080fd5b506103cc600480360360408110156103b657600080fd5b506001600160a01b0381351690602001356106fb565b005b3480156103da57600080fd5b50d380156103e757600080fd5b50d280156103f457600080fd5b506103cc6004803603602081101561040b57600080fd5b50356107ba565b34801561041e57600080fd5b50d3801561042b57600080fd5b50d2801561043857600080fd5b506102726004803603602081101561044f57600080fd5b50356001600160a01b03166107c7565b6102726004803603602081101561047557600080fd5b50356107e2565b34801561048857600080fd5b50d3801561049557600080fd5b50d280156104a257600080fd5b5061011c61098e565b3480156104b757600080fd5b50d380156104c457600080fd5b50d280156104d157600080fd5b506101e4600480360360408110156104e857600080fd5b506001600160a01b0381351690602001356109e9565b34801561050a57600080fd5b50d3801561051757600080fd5b50d2801561052457600080fd5b506101e46004803603604081101561053b57600080fd5b506001600160a01b038135169060200135610a25565b34801561055d57600080fd5b50d3801561056a57600080fd5b50d2801561057757600080fd5b506102726004803603604081101561058e57600080fd5b506001600160a01b0381358116916020013516610a32565b6004805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561062c5780601f106106015761010080835404028352916020019161062c565b820191906000526020600020905b81548152906001019060200180831161060f57829003601f168201915b505050505081565b6000610641338484610a5d565b50600192915050565b6003546001600160a01b031681565b60025490565b600061066c848484610ae5565b6001600160a01b0384166000908152600160209081526040808320338085529252909120546106ac9186916106a7908663ffffffff610bb016565b610a5d565b5060019392505050565b60065460ff1681565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916106419185906106a7908663ffffffff610bc516565b6003546001600160a01b0316331461071257600080fd5b6001600160a01b03821661072557600080fd5b600254610738908263ffffffff610bc516565b6002556001600160a01b038216600090815260208190526040902054610764908263ffffffff610bc516565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6107c43382610bdb565b50565b6001600160a01b031660009081526020819052604090205490565b600080600360009054906101000a90046001600160a01b03166001600160a01b0316631540aa896040518163ffffffff1660e01b815260040160206040518083038186803b15801561083357600080fd5b505afa158015610847573d6000803e3d6000fd5b505050506040513d602081101561085d57600080fd5b50519050348111156108b6576040805162461bcd60e51b815260206004820152601c60248201527f76616c7565206d757374206265203e3d20776974686472617746656500000000604482015290519081900360640190fd5b803411156108ef5760405133903483900380156108fc02916000818181858888f193505050501580156108ed573d6000803e3d6000fd5b505b600354610905906001600160a01b031684610a25565b50600354604080516329733f2160e11b81523360048201526024810186905290516001600160a01b03909216916352e67e42918491604480830192602092919082900301818588803b15801561095a57600080fd5b505af115801561096e573d6000803e3d6000fd5b50505050506040513d602081101561098557600080fd5b50519392505050565b6005805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561062c5780601f106106015761010080835404028352916020019161062c565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916106419185906106a7908663ffffffff610bb016565b6000610641338484610ae5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b038216610a7057600080fd5b6001600160a01b038316610a8357600080fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038216610af857600080fd5b6001600160a01b038316600090815260208190526040902054610b21908263ffffffff610bb016565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610b56908263ffffffff610bc516565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082821115610bbf57600080fd5b50900390565b81810182811015610bd557600080fd5b92915050565b6001600160a01b038216610bee57600080fd5b600254610c01908263ffffffff610bb016565b6002556001600160a01b038216600090815260208190526040902054610c2d908263ffffffff610bb016565b6001600160a01b038316600081815260208181526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3505056fea26474726f6e58209f02ad260a98c1c7a7d875ca0cdab1f42417101502cef9054be7d25a6f76366164736f6c637827302e352e392d646576656c6f702e323031392e382e32312b636f6d6d69742e31393035643732660056a36474726f6e58204d4b7b576fed8dd3ddbe7fbb5bc85ad55c9584e99ccac9d24c78b13ca2df7bfd6c6578706572696d656e74616cf564736f6c637827302e352e392d646576656c6f702e323031392e382e32312b636f6d6d69742e31393035643732660064";
//    String abi = "[{\"constant\":false,\"inputs\":[{\"name\":\"minValue\",\"type\":\"uint256\"}],\"name\":\"setWithdrawMinTrc20\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"stop\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_sunTokenAddress\",\"type\":\"address\"}],\"name\":\"setSunTokenAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenIdMap\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"key\",\"type\":\"address\"}],\"name\":\"getXc\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"depositDone\",\"outputs\":[{\"name\":\"r\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getWithdrawFee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\"},{\"name\":\"oracleSign\",\"type\":\"bytes\"}],\"name\":\"multiSignForWithdrawTRC10\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"mainContractList\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"withdrawMinTrc10\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"withdrawMinTrc20\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"mainContractCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"tokenId\",\"type\":\"trcToken\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"name\",\"type\":\"bytes32\"},{\"name\":\"symbol\",\"type\":\"bytes32\"},{\"name\":\"decimals\",\"type\":\"uint8\"},{\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"multiSignForDepositTRC10\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"minValue\",\"type\":\"uint256\"}],\"name\":\"setWithdrawMinTrc10\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"mainToSideContractMap\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdrawTRX\",\"outputs\":[{\"name\":\"r\",\"type\":\"uint256\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"depositSigns\",\"outputs\":[{\"name\":\"signCnt\",\"type\":\"uint256\"},{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"mainChainAddress\",\"type\":\"address\"},{\"name\":\"uId\",\"type\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"multiSignForDepositTRC721\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"retryFee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"onTRC20Received\",\"outputs\":[{\"name\":\"r\",\"type\":\"uint256\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"tokenId\",\"type\":\"uint256\"},{\"name\":\"tokenValue\",\"type\":\"uint256\"}],\"name\":\"withdrawTRC10\",\"outputs\":[{\"name\":\"r\",\"type\":\"uint256\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"it\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\"},{\"name\":\"oracleSign\",\"type\":\"bytes\"}],\"name\":\"multiSignForWithdrawTRX\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"isStop\",\"type\":\"bool\"}],\"name\":\"setStop\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\"},{\"name\":\"oracleSign\",\"type\":\"bytes\"}],\"name\":\"multiSignForWithdrawTRC721\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"sunTokenAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"mainChainAddress\",\"type\":\"address\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"symbol\",\"type\":\"string\"},{\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"multiSignForDeployDAppTRC721AndMapping\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"bonus\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_oracle\",\"type\":\"address\"}],\"name\":\"delOracle\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"getWithdrawSigns\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes[]\"},{\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"mainChainAddress\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"multiSignForDepositTRC20\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"numOracles\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"key\",\"type\":\"address\"},{\"name\":\"setValue\",\"type\":\"uint256\"}],\"name\":\"setXc\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"logicAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"retryWithdraw\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getCodeVersion\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getMainContractList\",\"outputs\":[{\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"uId\",\"type\":\"uint256\"}],\"name\":\"onTRC721Received\",\"outputs\":[{\"name\":\"r\",\"type\":\"uint256\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_oracle\",\"type\":\"address\"}],\"name\":\"isOracle\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"changeLogicSigns\",\"outputs\":[{\"name\":\"signCnt\",\"type\":\"uint256\"},{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"oracles\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"setWithdrawFee\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"getWithdrawMsg\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"setRetryFee\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"isPause\",\"type\":\"bool\"}],\"name\":\"setPause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"minValue\",\"type\":\"uint256\"}],\"name\":\"setWithdrawMinTrx\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"withdrawMinTrx\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"xc\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\"},{\"name\":\"oracleSign\",\"type\":\"bytes\"}],\"name\":\"multiSignForWithdrawTRC20\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"mappingSigns\",\"outputs\":[{\"name\":\"signCnt\",\"type\":\"uint256\"},{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"sideToMainContractMap\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"setIt\",\"type\":\"uint256\"}],\"name\":\"setIt\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_oracle\",\"type\":\"address\"}],\"name\":\"addOracle\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"multiSignForDepositTRX\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"mappingDone\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"withdrawFee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"mainChainAddress\",\"type\":\"address\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"symbol\",\"type\":\"string\"},{\"name\":\"decimals\",\"type\":\"uint8\"},{\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"multiSignForDeployDAppTRC20AndMapping\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawSigns\",\"outputs\":[{\"name\":\"signCnt\",\"type\":\"uint256\"},{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_logicAddress\",\"type\":\"address\"}],\"name\":\"setLogicAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"mainChainAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"sideChainAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"DeployDAppTRC20AndMapping\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"mainChainAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"sideChainAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"DeployDAppTRC721AndMapping\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"tokenId\",\"type\":\"trcToken\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"DepositTRC10\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"sideChainAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"DepositTRC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"sideChainAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"uId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"DepositTRC721\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"DepositTRX\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"tokenId\",\"type\":\"trcToken\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"WithdrawTRC10\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"mainChainAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"WithdrawTRC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"mainChainAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"uId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"WithdrawTRC721\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"WithdrawTRX\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"tokenId\",\"type\":\"trcToken\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"MultiSignForWithdrawTRC10\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"mainChainAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"MultiSignForWithdrawTRC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"mainChainAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"uId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"MultiSignForWithdrawTRC721\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"MultiSignForWithdrawTRX\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"it\",\"type\":\"uint256\"}],\"name\":\"ea\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"i\",\"type\":\"uint256\"}],\"name\":\"MapKetValue\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"result\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"msg\",\"type\":\"bytes\"}],\"name\":\"DelegateResult\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"oldAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"LogicAddressChanged\",\"type\":\"event\"}]\n";*/
//    // deploy SideChainGateway
//    String contractName = "SideChainGateway";
//    String filePath = "src/test/resources/soliditycode/SideChainGatewaym001.sol";
//    HashMap retMap = PublicMethedForDailybuild.getBycodeAbi(filePath, contractName);
//    String code = retMap.get("byteCode").toString();
//    String abi = retMap.get("abI").toString();
//    byte[] contractAddress = PublicMethed.deployContractForSide(contractName, abi, code, "",
//        maxFeeLimit, 0L, 0, 10000,
//        "0", 0, null, gateWatOwnerAddressKey,
//        gateWatOwnerAddress, chainIdAddressKey, blockingSideStubFull);
//
//    String parameN = "\"" + Base58.encode58Check(testOracleAddress) + "\"";
//
//    byte[] inputN = Hex.decode(AbiUtil.parseMethod("oracles(address)", parameN, false));
//    TransactionExtention return2 = PublicMethed
//        .triggerContractForTransactionExtention(
//            sideChainAddressKey, 0l, inputN, 1000000000,
//            0l, "0", gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//    int oracleIndexResult = ByteArray.toInt(return2.getConstantResult(0).toByteArray());
//    logger.info("oracleIndexResult:"+oracleIndexResult);
//    Assert.assertTrue(oracleIndexResult == 1);
//
//    parame1 = "\"" + Base58.encode58Check(contractAddress) + "\"";
//
//    input1 = Hex.decode(AbiUtil.parseMethod("setLogicAddress(address)", parame1, false));
//    ownerTrx = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            WalletClient.decodeFromBase58Check(chainIdAddress), 0l, input1,
//            1000000000,
//            0l, "0", testOracleAddress, testOracle, blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//
//    input1 = Hex.decode(AbiUtil.parseMethod("logicAddress()", "", false));
//    TransactionExtention return1 = PublicMethed
//        .triggerContractForTransactionExtention(
//            sideChainAddressKey, 0l, input1, 1000000000,
//            0l, "0", gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//
//    String ContractRestule = Hex.toHexString(return1.getConstantResult(0).toByteArray());
//
//    String tmpAddress = ContractRestule.substring(24);
//    logger.info(tmpAddress);
//    String addressHex = "41" + tmpAddress;
//    logger.info("address_hex: " + addressHex);
//    String addressFinal = Base58.encode58Check(ByteArray.fromHexString(addressHex));
//    logger.info("address_final: " + addressFinal);
//
//    byte[] sideContractAddress = WalletClient.decodeFromBase58Check(addressFinal);
//    Assert.assertNotNull(sideContractAddress);
//    Assert.assertEquals(Base58.encode58Check(contractAddress), addressFinal);
//
//    transactionExtention = PublicMethedForDailybuild
//        .triggerConstantContractForExtention(sideChainAddressKey,
//            "withdrawMinTrx()", "", false,
//            0, 0, "0", 0, gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//
//    Assert.assertEquals(10,
//        ByteArray.toInt(transactionExtention.getConstantResult(0).toByteArray()));
//
//    String methodStr3 = "setIt(uint256)";
//    String parame3 = "3";
//    byte[] input3 = Hex.decode(AbiUtil.parseMethod(methodStr3, parame3, false));
//
//    String txid2 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            WalletClient.decodeFromBase58Check(chainIdAddress), 0l, input3,
//            1000000000,
//            0l, "0", testOracleAddress, testOracle, blockingSideStubFull);
//    logger.info("ownerTrx : " + txid2);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//
//    Optional<TransactionInfo> infoById3 = PublicMethed
//        .getTransactionInfoById(txid2, blockingSideStubFull);
//    Assert.assertEquals(0, infoById3.get().getResultValue());
//
//    List<String> retList = PublicMethedForDailybuild
//        .getStrings(infoById3.get().getLogList().get(0).getData().toByteArray());
//    Long actualSalt = ByteArray.toLong(ByteArray.fromHexString(retList.get(0)));
//    Assert.assertTrue(Long.valueOf(parame3) == actualSalt);
//
//    return2 = PublicMethed
//        .triggerContractForTransactionExtention(sideChainAddressKey, 0l, inputN, 1000000000,
//            0l, "0", gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//    int oracleIndexResultAfter = ByteArray.toInt(return2.getConstantResult(0).toByteArray());
//    Assert.assertTrue(oracleIndexResult == oracleIndexResultAfter);
//
//    String setXc = "setXc(address,uint256)";
//    String parame4 = "\"" + Base58.encode58Check(sideChainAddressKey) + "\"," + 1001;
//
//    byte[] input4 = Hex.decode(AbiUtil.parseMethod(setXc, parame4, false));
//
//    String txid3 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            WalletClient.decodeFromBase58Check(chainIdAddress), 0l, input4,
//            1000000000,
//            0l, "0", testOracleAddress, testOracle, blockingSideStubFull);
//    logger.info("ownerTrx : " + txid3);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    String getXc = "getXc(address)";
//    String parame5 = "\"" + Base58.encode58Check(sideChainAddressKey) + "\"";
//    byte[] input5 = Hex.decode(AbiUtil.parseMethod(getXc, parame5, false));
//
//    String txid4 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            WalletClient.decodeFromBase58Check(chainIdAddress), 0l, input5,
//            1000000000,
//            0l, "0", testOracleAddress, testOracle, blockingSideStubFull);
//    logger.info("ownerTrx : " + txid4);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    Optional<TransactionInfo> infoById4 = PublicMethed
//        .getTransactionInfoById(txid4, blockingSideStubFull);
//    Assert.assertEquals(0, infoById4.get().getResultValue());
//    List<String> retList4 = PublicMethedForDailybuild
//        .getStrings(infoById4.get().getLogList().get(0).getData().toByteArray());
//    Long actualSalt1 = ByteArray.toLong(ByteArray.fromHexString(retList4.get(0)));
//    logger.info("actualSalt1:" + actualSalt1);
//    Assert.assertTrue(1001 == actualSalt1);
//
//    Assert.assertTrue(PublicMethed
//        .sendcoin(depositAddress, 2000000000L, testDepositAddress, testDepositTrx,
//            blockingStubFull));
//    PublicMethed.waitProduceNextBlock(blockingStubFull);
//
//    Account accountMainBefore = PublicMethed.queryAccount(depositAddress, blockingStubFull);
//    long accountMainBeforeBalance = accountMainBefore.getBalance();
//    Assert.assertTrue(accountMainBeforeBalance == 2000000000L);
//    Account accountSideBefore = PublicMethed.queryAccount(depositAddress, blockingSideStubFull);
//    long accountSideBeforeBalance = accountSideBefore.getBalance();
//    ByteString address = accountSideBefore.getAddress();
//    String accountSideBeforeAddress = Base58.encode58Check(address.toByteArray());
//    logger.info("accountSideBeforeAddress:" + accountSideBeforeAddress);
//    Assert.assertEquals("3QJmnh", accountSideBeforeAddress);
//
//    logger.info("accountBeforeBalance:" + accountMainBeforeBalance);
//    logger.info("accountSideBeforeBalance:" + accountSideBeforeBalance);
//
//    logger.info("transferTokenContractAddress:" + mainGateWayAddress);
//    String methodStr = "depositTRX()";
//    byte[] input = Hex.decode(AbiUtil.parseMethod(methodStr, "", false));
//
//    long callValue = 1500000000;
//    String txid = PublicMethed
//        .triggerContract(WalletClient.decodeFromBase58Check(mainGateWayAddress),
//            callValue,
//            input,
//            maxFeeLimit, 0, "", depositAddress, testKeyFordeposit, blockingStubFull);
//    PublicMethed.waitProduceNextBlock(blockingStubFull);
//    PublicMethed.waitProduceNextBlock(blockingStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//
//    Optional<TransactionInfo> infoById = PublicMethed
//        .getTransactionInfoById(txid, blockingStubFull);
//    Assert.assertTrue(infoById.get().getResultValue() == 0);
//    long fee = infoById.get().getFee();
//    logger.info("fee:" + fee);
//    Account accountMainAfter = PublicMethed.queryAccount(depositAddress, blockingStubFull);
//    long accountMainAfterBalance = accountMainAfter.getBalance();
//    logger.info("accountMainAfterBalance:" + accountMainAfterBalance);
//    Assert.assertEquals(accountMainAfterBalance, accountMainBeforeBalance - fee - 1500000000);
//    Account accountSideAfter = PublicMethed.queryAccount(depositAddress, blockingSideStubFull);
//    long accountSideAfterBalance = accountSideAfter.getBalance();
//    ByteString addressSideAfter = accountSideAfter.getAddress();
//    String accountSideAfterAddress = Base58.encode58Check(addressSideAfter.toByteArray());
//    logger.info("accountSideAfterAddress:" + accountSideAfterAddress);
//    Assert.assertEquals(Base58.encode58Check(depositAddress), accountSideAfterAddress);
//    Assert.assertEquals(1500000000, accountSideAfterBalance);
//
//    logger.info("sideGatewayAddress:" + sideGatewayAddress);
//    long withdrawValue = 100;
//    String txid1 = PublicMethed
//        .withdrawTrx(ChainIdAddress,
//            sideGatewayAddress,
//            withdrawValue,
//            maxFeeLimit, depositAddress, testKeyFordeposit, blockingStubFull, blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//
//    Optional<TransactionInfo> infoById1 = PublicMethed
//        .getTransactionInfoById(txid1, blockingSideStubFull);
//    Assert.assertTrue(infoById1.get().getResultValue() == 0);
//    long fee1 = infoById1.get().getFee();
//    logger.info("fee1:" + fee1);
//    Account accountSideAfterWithdraw = PublicMethed
//        .queryAccount(depositAddress, blockingSideStubFull);
//    long accountSideAfterWithdrawBalance = accountSideAfterWithdraw.getBalance();
//    ByteString addressAfterWithdraw = accountSideAfterWithdraw.getAddress();
//    String addressAfterWithdrawAddress = Base58
//        .encode58Check(addressAfterWithdraw.toByteArray());
//    logger.info("addressAfterWithdrawAddress:" + addressAfterWithdrawAddress);
//    Assert.assertEquals(Base58.encode58Check(depositAddress), addressAfterWithdrawAddress);
//    Assert.assertEquals(accountSideAfterBalance - fee1 - withdrawValue,
//        accountSideAfterWithdrawBalance);
//    Account accountMainAfterWithdraw = PublicMethed.queryAccount(depositAddress, blockingStubFull);
//    long accountMainAfterWithdrawBalance = accountMainAfterWithdraw.getBalance();
//    logger.info("accountAfterWithdrawBalance:" + accountMainAfterWithdrawBalance);
//    Assert.assertEquals(accountMainAfterBalance + withdrawValue,
//        accountMainAfterWithdrawBalance);
//
//
//  }
//
//
//  @Test(enabled = true, description = "DelegateCall for reduction method and codeversion in sideChain")
//  public void test1DelegateCall002() {
//    byte[] input = Hex.decode(AbiUtil.parseMethod("getCodeVersion()", "", false));
//    TransactionExtention extention = PublicMethed
//        .triggerContractForTransactionExtention(
//            sideChainAddressKey, 0l, input, 1000000000,
//            0l, "0", gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//    Assert.assertEquals(
//        "00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000005312e302e32000000000000000000000000000000000000000000000000000000",
//        ByteArray.toHexString(extention.getConstantResult(0).toByteArray()));
//
//    // deploy SideChainGateway
//    String contractName = "SideChainGateway";
//    String filePath = "src/test/resources/soliditycode/SideChainGatewaym002.sol";
//    HashMap retMap = PublicMethedForDailybuild.getBycodeAbi(filePath, contractName);
//    String code = retMap.get("byteCode").toString();
//    String abi = retMap.get("abI").toString();
//
//    byte[] contractAddress = PublicMethed.deployContractForSide(contractName, abi, code, "",
//        maxFeeLimit, 0L, 0, 10000,
//        "0", 0, null, gateWatOwnerAddressKey,
//        gateWatOwnerAddress, chainIdAddressKey, blockingSideStubFull);
//
//    Account contractAddressAccount = PublicMethed
//        .queryAccount(depositAddress, blockingSideStubFull);
//    ByteString contractAddressStr = contractAddressAccount.getAddress();
//    String contractSideAddress = Base58.encode58Check(contractAddressStr.toByteArray());
//    logger.info("contractSideAddress:" + contractSideAddress);
//    Assert.assertNotEquals("3QJmnh", contractSideAddress);
//
//    String parameN = "\"" + Base58.encode58Check(testOracleAddress) + "\"";
//
//    byte[] inputN = Hex.decode(AbiUtil.parseMethod("isOracle(address)", parameN, false));
//    TransactionExtention return2 = PublicMethed
//        .triggerContractForTransactionExtention(
//            sideChainAddressKey, 0l, inputN, 1000000000,
//            0l, "0", gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//    int oracleIndexResult = ByteArray.toInt(return2.getConstantResult(0).toByteArray());
//    Assert.assertTrue(oracleIndexResult == 1);
//
//    parame1 = "\"" + Base58.encode58Check(contractAddress) + "\"";
//
//    byte[] input1 = Hex.decode(AbiUtil.parseMethod("setLogicAddress(address)", parame1, false));
//    String ownerTrx = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            WalletClient.decodeFromBase58Check(chainIdAddress), 0l, input1,
//            1000000000,
//            0l, "0", testOracleAddress, testOracle, blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//
//    input1 = Hex.decode(AbiUtil.parseMethod("logicAddress()", "", false));
//    TransactionExtention return1 = PublicMethed
//        .triggerContractForTransactionExtention(
//            sideChainAddressKey, 0l, input1, 1000000000,
//            0l, "0", gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//
//    String ContractRestule = Hex.toHexString(return1.getConstantResult(0).toByteArray());
//
//    String tmpAddress = ContractRestule.substring(24);
//    logger.info(tmpAddress);
//    String addressHex = "41" + tmpAddress;
//    logger.info("address_hex: " + addressHex);
//    String addressFinal = Base58.encode58Check(ByteArray.fromHexString(addressHex));
//    logger.info("address_final: " + addressFinal);
//
//    byte[] sideContractAddress = WalletClient.decodeFromBase58Check(addressFinal);
//    Assert.assertNotNull(sideContractAddress);
//    Assert.assertEquals(Base58.encode58Check(contractAddress), addressFinal);
//
//    String methodStr3 = "setIt(uint256)";
//    String parame3 = "3";
//    byte[] input3 = Hex.decode(AbiUtil.parseMethod(methodStr3, parame3, false));
//
//    String txid2 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            WalletClient.decodeFromBase58Check(chainIdAddress), 0l, input3,
//            1000000000,
//            0l, "0", testOracleAddress, testOracle, blockingSideStubFull);
//    logger.info("txid2 : " + txid2);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//
//    Optional<TransactionInfo> infoById3 = PublicMethed
//        .getTransactionInfoById(txid2, blockingSideStubFull);
//    Assert.assertEquals(0, infoById3.get().getResultValue());
//    Assert.assertTrue(infoById3.get().getInternalTransactionsList().get(0).getRejected());
//
//    TransactionExtention extention2 = PublicMethed
//        .triggerContractForTransactionExtention(
//            sideChainAddressKey, 0l, input, 1000000000,
//            0l, "0", gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//    Assert.assertEquals(
//        "00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000005312e302e33000000000000000000000000000000000000000000000000000000",
//        ByteArray.toHexString(extention2.getConstantResult(0).toByteArray()));
//
//    return2 = PublicMethed
//        .triggerContractForTransactionExtention(sideChainAddressKey, 0l, inputN, 1000000000,
//            0l, "0", gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//    int oracleIndexResultAfter = ByteArray.toInt(return2.getConstantResult(0).toByteArray());
//    Assert.assertTrue(oracleIndexResult == oracleIndexResultAfter);
//  }
//
//  @Test(enabled = true, description = "DelegateCall on stop and pause in sideChain")
//  public void test1DelegateCall003() {
//    String parame5 = "true";
//    byte[] input5 = Hex.decode(AbiUtil.parseMethod("setStop(bool)", parame5, false));
//    String txid5 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            ChainIdAddressKey, 0l, input5, 1000000000,
//            0l, "0", sideGateWayOwnerAddress, sideGateWayOwner, blockingSideStubFull);
//
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    Optional<TransactionInfo> infoById5 = PublicMethed
//        .getTransactionInfoById(txid5, blockingSideStubFull);
//    Assert.assertTrue(infoById5.get().getResultValue() == 0);
//    Assert.assertFalse(infoById5.get().getInternalTransactionsList().get(0).getRejected());
//
//    // deploy Contract
//    String contractName = "SideChainGateway";
//    String filePath = "src/test/resources/soliditycode/SideChainGatewaym003.sol";
//    HashMap retMap = PublicMethedForDailybuild.getBycodeAbi(filePath, contractName);
//    String code = retMap.get("byteCode").toString();
//    String abi = retMap.get("abI").toString();
//
//    byte[] contractAddress1 = PublicMethed.deployContractForSide(contractName, abi, code, "",
//        maxFeeLimit, 0L, 0, 10000,
//        "0", 0, null, gateWatOwnerAddressKey,
//        gateWatOwnerAddress, chainIdAddressKey, blockingSideStubFull);
//    parame1 = "\"" + Base58.encode58Check(contractAddress1) + "\"";
//
//    byte[] input3 = Hex.decode(AbiUtil.parseMethod("setLogicAddress(address)", parame1, false));
//    String ownerTrx3 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            WalletClient.decodeFromBase58Check(chainIdAddress), 0l, input3,
//            1000000000,
//            0l, "0", testOracleAddress, testOracle, blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//
//    byte[] input1 = Hex.decode(AbiUtil.parseMethod("logicAddress()", "", false));
//    TransactionExtention return1 = PublicMethed
//        .triggerContractForTransactionExtention(
//            sideChainAddressKey, 0l, input1, 1000000000,
//            0l, "0", gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//
//    String ContractRestule = Hex.toHexString(return1.getConstantResult(0).toByteArray());
//
//    String tmpAddress = ContractRestule.substring(24);
//    logger.info(tmpAddress);
//    String addressHex = "41" + tmpAddress;
//    logger.info("address_hex: " + addressHex);
//    String addressFinal = Base58.encode58Check(ByteArray.fromHexString(addressHex));
//    logger.info("address_final: " + addressFinal);
//
//    byte[] sideContractAddress = WalletClient.decodeFromBase58Check(addressFinal);
//    Assert.assertNotNull(sideContractAddress);
//    Assert.assertEquals(Base58.encode58Check(contractAddress1), addressFinal);
//
//    String parame1 = "false";
//    byte[] input6 = Hex.decode(AbiUtil.parseMethod("setStop(bool)", parame1, false));
//    String txid6 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            ChainIdAddressKey, 0l, input6, 1000000000,
//            0l, "0", sideGateWayOwnerAddress, sideGateWayOwner, blockingSideStubFull);
//
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    Optional<TransactionInfo> infoById6 = PublicMethed
//        .getTransactionInfoById(txid6, blockingSideStubFull);
//    Assert.assertEquals(0, infoById6.get().getResultValue());
//    Assert.assertFalse(infoById6.get().getInternalTransactionsList().get(0).getRejected());
//
//    String parame2 = "true";
//    byte[] input7 = Hex.decode(AbiUtil.parseMethod("setPause(bool)", parame2, false));
//
//    String txid7 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            ChainIdAddressKey, 0l, input7, 1000000000,
//            0l, "0", sideGateWayOwnerAddress, sideGateWayOwner, blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    Optional<TransactionInfo> infoById7 = PublicMethed
//        .getTransactionInfoById(txid7, blockingSideStubFull);
//    Assert.assertEquals(0, infoById7.get().getResultValue());
//    Assert.assertFalse(infoById7.get().getInternalTransactionsList().get(0).getRejected());
//
//    byte[] contractAddress2 = PublicMethed.deployContractForSide(contractName, abi, code, "",
//        maxFeeLimit, 0L, 0, 10000,
//        "0", 0, null, gateWatOwnerAddressKey,
//        gateWatOwnerAddress, chainIdAddressKey, blockingSideStubFull);
//    parame2 = "\"" + Base58.encode58Check(contractAddress2) + "\"";
//
//    byte[] input4 = Hex.decode(AbiUtil.parseMethod("setLogicAddress(address)", parame2, false));
//    String ownerTrx4 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            WalletClient.decodeFromBase58Check(chainIdAddress), 0l, input4,
//            1000000000,
//            0l, "0", testOracleAddress, testOracle, blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//
//    byte[] input10 = Hex.decode(AbiUtil.parseMethod("logicAddress()", "", false));
//    TransactionExtention return2 = PublicMethed
//        .triggerContractForTransactionExtention(
//            sideChainAddressKey, 0l, input10, 1000000000,
//            0l, "0", gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//
//    String ContractRestule2 = Hex.toHexString(return2.getConstantResult(0).toByteArray());
//
//    String tmpAddress2 = ContractRestule2.substring(24);
//    logger.info(tmpAddress2);
//    String addressHex2 = "41" + tmpAddress2;
//    logger.info("address_hex: " + addressHex2);
//    String addressFinal2 = Base58.encode58Check(ByteArray.fromHexString(addressHex2));
//    logger.info("address_final2: " + addressFinal2);
//
//    byte[] sideContractAddress2 = WalletClient.decodeFromBase58Check(addressFinal2);
//    Assert.assertNotNull(sideContractAddress2);
//    Assert.assertEquals(Base58.encode58Check(contractAddress2), addressFinal2);
//
//    String parame3 = "false";
//    byte[] input8 = Hex.decode(AbiUtil.parseMethod("setPause(bool)", parame3, false));
//
//    String txid8 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            ChainIdAddressKey, 0l, input8, 1000000000,
//            0l, "0", sideGateWayOwnerAddress, sideGateWayOwner, blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    Optional<TransactionInfo> infoById8 = PublicMethed
//        .getTransactionInfoById(txid8, blockingSideStubFull);
//    Assert.assertEquals(0, infoById8.get().getResultValue());
//    Assert.assertFalse(infoById8.get().getInternalTransactionsList().get(0).getRejected());
//  }
//
//
//  @Test(enabled = true, description = "DelegateCall for modify method in sideChain")
//  public void test1DelegateCall004() {
//
//    Assert.assertTrue(PublicMethed
//        .sendcoin(depositAddress, 100000000L, testDepositAddress, testDepositTrx,
//            blockingStubFull));
//    PublicMethed.waitProduceNextBlock(blockingStubFull);
//
//    Account accountBefore = PublicMethed.queryAccount(depositAddress, blockingStubFull);
//    long accountBeforeBalance = accountBefore.getBalance();
////    Assert.assertTrue(accountBeforeBalance == 100000000);
//    Account accountSideBefore = PublicMethed.queryAccount(depositAddress, blockingSideStubFull);
//    long accountSideBeforeBalance = accountSideBefore.getBalance();
//    ByteString address = accountSideBefore.getAddress();
//    String accountSideBeforeAddress = Base58.encode58Check(address.toByteArray());
//    logger.info("accountSideBeforeAddress:" + accountSideBeforeAddress);
////    Assert.assertEquals("3QJmnh", accountSideBeforeAddress);
//
//    logger.info("accountBeforeBalance:" + accountBeforeBalance);
//    logger.info("accountSideBeforeBalance:" + accountSideBeforeBalance);
//
//    logger.info("mainGateWayAddress:" + mainGateWayAddress);
//    String methodStr = "depositTRX()";
//    byte[] input = Hex.decode(AbiUtil.parseMethod(methodStr, "", false));
//
//    long callValue = 1;
//    String txid = PublicMethed
//        .triggerContract(WalletClient.decodeFromBase58Check(mainGateWayAddress),
//            callValue,
//            input,
//            maxFeeLimit, 0, "", depositAddress, testKeyFordeposit, blockingStubFull);
//    PublicMethed.waitProduceNextBlock(blockingStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//
//    Optional<TransactionInfo> infoById = PublicMethed
//        .getTransactionInfoById(txid, blockingStubFull);
//    Assert.assertTrue(infoById.get().getResultValue() == 0);
//    long fee = infoById.get().getFee();
//    logger.info("fee:" + fee);
//    Account accountAfter = PublicMethed.queryAccount(depositAddress, blockingStubFull);
//    long accountAfterBalance = accountAfter.getBalance();
//    logger.info("accountAfterBalance:" + accountAfterBalance);
//    Assert.assertEquals(accountAfterBalance, accountBeforeBalance - fee - 1);
//    Account accountSideAfter = PublicMethed.queryAccount(depositAddress, blockingSideStubFull);
//    long accountSideAfterBalance = accountSideAfter.getBalance();
//    ByteString addressAfter = accountSideAfter.getAddress();
//    String accountSideAfterAddress = Base58.encode58Check(addressAfter.toByteArray());
//    logger.info("accountSideAfterAddress:" + accountSideAfterAddress);
//    Assert.assertEquals(Base58.encode58Check(depositAddress), accountSideAfterAddress);
//    Assert.assertEquals(accountSideBeforeBalance + 2, accountSideAfterBalance);
//
//  }
//
//  @Test(enabled = true, description = "DelegateCall for transferOwnership in sideChain")
//  public void test1DelegateCall005() {
//    byte[] input1 = Hex.decode(AbiUtil.parseMethod("numOracles()", "", false));
//    TransactionExtention return1 = PublicMethed
//        .triggerContractForTransactionExtention(
//            sideChainAddressKey, 0l, input1, 1000000000,
//            0l, "0", gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//    int numOraclesResult = ByteArray.toInt(return1.getConstantResult(0).toByteArray());
//    Assert.assertTrue(numOraclesResult == 1);
//
//    Assert.assertTrue(PublicMethed
//        .sendcoinForSidechain(ownerAddress1, 10000000000L, testDepositAddress, testDepositTrx,
//            chainIdAddressKey, blockingSideStubFull));
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//
//    String parame = "true";
//    byte[] input = Hex.decode(AbiUtil.parseMethod("setStop(bool)", parame, false));
//    String txid = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            ChainIdAddressKey, 0l, input, 1000000000,
//            0l, "0", ownerAddress1, ownerKey1, blockingSideStubFull);
//
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    Optional<TransactionInfo> infoById = PublicMethed
//        .getTransactionInfoById(txid, blockingSideStubFull);
//    Assert.assertEquals(0, infoById.get().getResultValue());
//    Assert.assertEquals(
//        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006408c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000136d73672e73656e64657220213d206f776e65720000000000000000000000000000000000000000000000000000000000000000000000000000000000",
//        ByteArray.toHexString(infoById.get().getLogList().get(0).getData().toByteArray()));
//    Assert.assertTrue(infoById.get().getInternalTransactionsList().get(0).getRejected());
//
//    String parame2 = "\"" + Base58.encode58Check(ownerAddress1) + "\"";
//
//    byte[] input2 = Hex.decode(AbiUtil.parseMethod("transferOwnership(address)", parame2, false));
//    String txid2 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            WalletClient.decodeFromBase58Check(chainIdAddress), 0l, input2,
//            1000000000,
//            0l, "0", gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    Optional<TransactionInfo> infoById2 = PublicMethed
//        .getTransactionInfoById(txid2, blockingSideStubFull);
//    Assert.assertEquals(0, infoById2.get().getResultValue());
//
//    String parame3 = "true";
//    byte[] input3 = Hex.decode(AbiUtil.parseMethod("setStop(bool)", parame3, false));
//    String txid3 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            ChainIdAddressKey, 0l, input3, 1000000000,
//            0l, "0", sideGateWayOwnerAddress, sideGateWayOwner, blockingSideStubFull);
//
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    Optional<TransactionInfo> infoById3 = PublicMethed
//        .getTransactionInfoById(txid3, blockingSideStubFull);
//    Assert.assertEquals(0, infoById3.get().getResultValue());
//    Assert.assertEquals(
//        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006408c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000136d73672e73656e64657220213d206f776e65720000000000000000000000000000000000000000000000000000000000000000000000000000000000",
//        ByteArray.toHexString(infoById3.get().getLogList().get(0).getData().toByteArray()));
//    Assert.assertTrue(infoById3.get().getInternalTransactionsList().get(0).getRejected());
//
//    String txid4 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            ChainIdAddressKey, 0l, input3, 1000000000,
//            0l, "0", ownerAddress1, ownerKey1, blockingSideStubFull);
//
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    Optional<TransactionInfo> infoById4 = PublicMethed
//        .getTransactionInfoById(txid4, blockingSideStubFull);
//    Assert.assertEquals(0, infoById4.get().getResultValue());
//    logger.info("infoById4.get().getLogList().get(0).getData():"+ByteArray.toHexString(infoById4.get().getLogList().get(0).getData().toByteArray()));
//    Assert.assertFalse(infoById4.get().getInternalTransactionsList().get(0).getRejected());
//
//    String parame5 = "false";
//    byte[] input5 = Hex.decode(AbiUtil.parseMethod("setStop(bool)", parame5, false));
//    String txid5 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            ChainIdAddressKey, 0l, input5, 1000000000,
//            0l, "0", ownerAddress1, ownerKey1, blockingSideStubFull);
//
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    Optional<TransactionInfo> infoById5 = PublicMethed
//        .getTransactionInfoById(txid5, blockingSideStubFull);
//    Assert.assertEquals(0, infoById5.get().getResultValue());
//    logger.info("infoById5.get().getLogList().get(0).getData():"+ByteArray.toHexString(infoById5.get().getLogList().get(0).getData().toByteArray()));
//    Assert.assertFalse(infoById5.get().getInternalTransactionsList().get(0).getRejected());
//
//    // deploy SideChainGateway
//    String contractName = "SideChainGateway";
//    String filePath = "src/test/resources/soliditycode/SideChainGatewaym005.sol";
//    HashMap retMap = PublicMethedForDailybuild.getBycodeAbi(filePath, contractName);
//    String code = retMap.get("byteCode").toString();
//    String abi = retMap.get("abI").toString();
//
//    byte[] contractAddress = PublicMethed.deployContractForSide(contractName, abi, code, "",
//        maxFeeLimit, 0L, 0, 10000, "0", 0, null, ownerKey1, ownerAddress1, chainIdAddressKey,
//        blockingSideStubFull);
//
//    String parame6 = "\"" + Base58.encode58Check(contractAddress) + "\"";
//
//    byte[] input6 = Hex.decode(AbiUtil.parseMethod("setLogicAddress(address)", parame6, false));
//    String txid6 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            WalletClient.decodeFromBase58Check(chainIdAddress), 0l, input6,
//            1000000000,
//            0l, "0", testOracleAddress, testOracle, blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//
//    input1 = Hex.decode(AbiUtil.parseMethod("logicAddress()", "", false));
//    TransactionExtention return2 = PublicMethed
//        .triggerContractForTransactionExtention(
//            sideChainAddressKey, 0l, input1, 1000000000,
//            0l, "0", gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//
//    String ContractRestule = Hex.toHexString(return2.getConstantResult(0).toByteArray());
//
//    String tmpAddress = ContractRestule.substring(24);
//    logger.info(tmpAddress);
//    String addressHex = "41" + tmpAddress;
//    logger.info("address_hex: " + addressHex);
//    String addressFinal = Base58.encode58Check(ByteArray.fromHexString(addressHex));
//    logger.info("address_final: " + addressFinal);
//
//    byte[] sideContractAddress = WalletClient.decodeFromBase58Check(addressFinal);
//    Assert.assertNotNull(sideContractAddress);
//    Assert.assertEquals(Base58.encode58Check(contractAddress), addressFinal);
//
//    Assert.assertTrue(PublicMethed
//        .sendcoinForSidechain(ownerAddress2, 10000000000L, testDepositAddress, testDepositTrx,
//            chainIdAddressKey, blockingSideStubFull));
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//
//    String parame7 = "\"" + Base58.encode58Check(ownerAddress2) + "\"";
//
//    byte[] input7 = Hex.decode(AbiUtil.parseMethod("transferOwnership(address)", parame7, false));
//    String txid7 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            WalletClient.decodeFromBase58Check(chainIdAddress), 0l, input7,
//            1000000000,
//            0l, "0", ownerAddress1, ownerKey1, blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    Optional<TransactionInfo> infoById7 = PublicMethed
//        .getTransactionInfoById(txid7, blockingSideStubFull);
//    Assert.assertEquals(0, infoById7.get().getResultValue());
//    Assert.assertFalse(infoById7.get().getInternalTransactionsList().get(0).getRejected());
//
//    String parame8 = "true";
//    byte[] input8 = Hex.decode(AbiUtil.parseMethod("setStop(bool)", parame8, false));
//    String txid8 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            ChainIdAddressKey, 0l, input8, 1000000000,
//            0l, "0", ownerAddress1, ownerKey1, blockingSideStubFull);
//
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    Optional<TransactionInfo> infoById8 = PublicMethed
//        .getTransactionInfoById(txid8, blockingSideStubFull);
//    Assert.assertEquals(0, infoById8.get().getResultValue());
//    Assert.assertEquals(
//        "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006408c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000136d73672e73656e64657220213d206f776e65720000000000000000000000000000000000000000000000000000000000000000000000000000000000",
//        ByteArray.toHexString(infoById8.get().getLogList().get(0).getData().toByteArray()));
//    Assert.assertTrue(infoById8.get().getInternalTransactionsList().get(0).getRejected());
//
//    String txid9 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            ChainIdAddressKey, 0l, input8, 1000000000,
//            0l, "0", ownerAddress2, ownerKey2, blockingSideStubFull);
//
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    Optional<TransactionInfo> infoById9 = PublicMethed
//        .getTransactionInfoById(txid9, blockingSideStubFull);
//    Assert.assertEquals(0, infoById9.get().getResultValue());
//    logger.info("infoById9.get().getLogList().get(0).getData():"+ByteArray.toHexString(infoById9.get().getLogList().get(0).getData().toByteArray()));
//    Assert.assertFalse(infoById9.get().getInternalTransactionsList().get(0).getRejected());
//
//    String parame10 = "false";
//    byte[] input10 = Hex.decode(AbiUtil.parseMethod("setStop(bool)", parame10, false));
//    String txid10 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            ChainIdAddressKey, 0l, input10, 1000000000,
//            0l, "0", ownerAddress2, ownerKey2, blockingSideStubFull);
//
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    Optional<TransactionInfo> infoById10 = PublicMethed
//        .getTransactionInfoById(txid10, blockingSideStubFull);
//    Assert.assertEquals(0, infoById10.get().getResultValue());
//    Assert.assertFalse(infoById10.get().getInternalTransactionsList().get(0).getRejected());
//
//    String parame11 = "\"" + Base58.encode58Check(gateWatOwnerAddress) + "\"";
//
//    byte[] input11 = Hex.decode(AbiUtil.parseMethod("transferOwnership(address)", parame11, false));
//    String txid11 = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            WalletClient.decodeFromBase58Check(chainIdAddress), 0l, input11,
//            1000000000,
//            0l, "0", ownerAddress2, ownerKey2, blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    Optional<TransactionInfo> infoById11 = PublicMethed
//        .getTransactionInfoById(txid11, blockingSideStubFull);
//    Assert.assertEquals(0, infoById11.get().getResultValue());
//    Assert.assertFalse(infoById11.get().getInternalTransactionsList().get(0).getRejected());
//  }
//
//  /**
//   * constructor.
//   */
//  @AfterClass
//  public void shutdown() throws InterruptedException {
//    parame1 = "\"T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb\"";
//
//    byte[] input1 = Hex.decode(AbiUtil.parseMethod("setLogicAddress(address)", parame1, false));
//    String ownerTrx = PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            WalletClient.decodeFromBase58Check(chainIdAddress), 0l, input1,
//            1000000000,
//            0l, "0", testOracleAddress, testOracle, blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//
//    input1 = Hex.decode(AbiUtil.parseMethod("logicAddress()", "", false));
//    TransactionExtention return1 = PublicMethed
//        .triggerContractForTransactionExtention(
//            sideChainAddressKey, 0l, input1, 1000000000,
//            0l, "0", gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//
//    String ContractRestule = Hex.toHexString(return1.getConstantResult(0).toByteArray());
//
//    String tmpAddress = ContractRestule.substring(24);
//    logger.info(tmpAddress);
//    String addressHex = "41" + tmpAddress;
//    logger.info("address_hex: " + addressHex);
//    String addressFinal = Base58.encode58Check(ByteArray.fromHexString(addressHex));
//    logger.info("address_final: " + addressFinal);
//
//    byte[] sideContractAddress = WalletClient.decodeFromBase58Check(addressFinal);
//    Assert.assertNotNull(sideContractAddress);
//    Assert.assertEquals("T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb", addressFinal);
//
//    parame1 = "1";
//    byte[] input2 = Hex.decode(AbiUtil.parseMethod("setWithdrawMinTrx(uint256)", parame1, false));
//    PublicMethed
//        .triggerContractSideChain(sideChainAddressKey,
//            WalletClient.decodeFromBase58Check(chainIdAddress), 0l, input2,
//            1000000000,
//            0l, "0", gateWatOwnerAddress, gateWatOwnerAddressKey, blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    PublicMethed.waitProduceNextBlock(blockingSideStubFull);
//    if (channelFull != null) {
//      channelFull.shutdown().awaitTermination(5, TimeUnit.SECONDS);
//    }
//    if (channelFull1 != null) {
//      channelFull1.shutdown().awaitTermination(5, TimeUnit.SECONDS);
//    }
//  }

}
